Communicate with the docker engine from inside a container

Hello Everyone,

I would like to know if its possible to communicate with docker engine from inside a container.

Use case:
Main server runs in the docker container - One of the component execute python code and generate few files.
For security concern - We would like to encapsulate python execution into different container away from host container.

Thank you for reading so far.

Best Regards,