{ "info": { "author": "Mihai Costea", "author_email": "mihai.andrei.costea@icloud.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3.5", "Topic :: Software Development :: Libraries" ], "description": "Cage\n====\n\nDevelop and run your Python applications in clean Docker environments\nCage aims to be as easy to use and as familiar as possible.\n\nRequirements\n------------\n\n- Docker\n- Python 3.5+\n\nInstallation\n------------\n\n.. code:: bash\n\n $ pip install pycage\n\nUsage\n-----\n\nNOTE: Docker should be running before using any of the Cage commands.\nAll commands should be run from your project directory!\n\nCreate a new cage\n~~~~~~~~~~~~~~~~~\n\n.. code:: bash\n\n $ cage app:create \n\nThis command will create a new Dockerfile in the root your project and\ninitialize all the necessary environment files.\n\nActivate the new environment\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n.. code:: bash\n\n $ source /bin/activate\n\nThis command should be very familiar to\n`virtualenv `__ users. This\nadjusts your environment to make sure you use the caged python binaries.\n\nRun your project\n~~~~~~~~~~~~~~~~\n\n.. code:: bash\n\n ()$ python \n\nRunning a script with the caged python binary will build a new Docker\nimage with your project files, create a new container using that image\nand run the python command you specified.\n\nPassing environment variables\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nYou can pass environment variables to the cage by creating a **ENV**\nfile in the root of your project. The file structure should be\nVAR=VALUE.\n\nExample:\n\n::\n\n AVAR=value1\n BVAR=value2\n\nYou can also place this file anywhere in your project. If it is not in\nthe root of your project you can specify the path to it by passing the\nENV variable when running a python script.\n\n.. code:: bash\n\n ()$ ENV=path/to/ENV python \n\nExpose a TCP Port\n~~~~~~~~~~~~~~~~~\n\nTo expose a TCP port from the cage, use the PORT environment variable\ndefined in your ENV file.\n\nExample:\n\n::\n\n PORT=5000\n\nSpecifying it in the ENV file will also make it available in the cage so\nyou can bind your apps to it easily.\n\nWorking with requirements\n~~~~~~~~~~~~~~~~~~~~~~~~~\n\nThe current version of Cage only supports dependencies **written in a\nrequirements file**:\n\n.. code:: bash\n\n ()$ pip install -r requirements.txt\n\nYou *cannot* use any other pip commands with this version. This includes\nsimple pip install commands like:\n\n.. code:: bash\n\n ()$ pip install \n\nStop a cage\n~~~~~~~~~~~\n\n.. code:: bash\n\n ()$ cage app:stop \n\nDeactivating the environment\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n.. code:: bash\n\n (