Skip to main content

Procfile and Deployfile process manager for Python virtual environments

Project description

Build Status PyPI version

The Procfile & Deployfile process manager for Python Virtual Environments.

Bureaucrat provides support for Deployfile based deployment task management. A Deployfile is basically a Procfile by another name. It is used to define the deployment commands for your project and spawn the processes required to run it.

Deployfile commands must be idempotent.

If you’re using Docker then you might find this useful to automate your container builds.


Install from PyPI with:

pip install bureaucrat

Or install from source with:

pip install git+


To use Bureaucrat you will need to create a Procfile, Deployfile and .env file in your virtual env root.

Sample Procfile

The following will spawn a single gunicorn web process.

web: gunicorn project.wsgi:application --workers $WORKERS --log-file $LOGFILE --bind$PORT --timeout 300

Sample Deployfile

The following is suitable for deploying a Django application.

pip: pip install -r requirements.txt
migrate: migrate --noinput
collectstatic: collectstatic --noinput

Sample .env



Basic options are start, stop, restart, deploy and init.

usage: Bureaucrat [-h] {start,stop,restart,deploy,init} ...

Bureaucrat - the Procfile & Deployfile manager for Python Virtual Environments

positional arguments:
    start               Starts Procfile processes
    stop                Stops Procfile processes
    restart             Restarts Procfile processes
    deploy              Run tasks in Deployfile
    init                Run Deployfile tasks and then start Procfile processes
                        in foreground

optional arguments:
  -h, --help            show this help message and exit

Start / Stop / Restart Arguments

Additional arguments for specifying a custom location for Procfile, .env and log files.

usage: Bureaucrat start [-h] [--venv VENV] [--app APP] [--procfile PROCFILE]
                        [--envfile ENVFILE] [--logpath LOGPATH]
                        [--pidpath PIDPATH]
                        [process [process ...]]

positional arguments:
  process              Procfile Process Name

optional arguments:
  -h, --help           show this help message and exit
  --venv VENV          Virtualenv root
  --app APP            Application root
  --procfile PROCFILE  Procfile path
  --envfile ENVFILE    .env file path
  --logpath LOGPATH    log file path
  --pidpath PIDPATH    pid file path


$ bureaucrat start
Spawning web: gunicorn project.wsgi:application --log-file log/gunicorn.$LOGFILE --bind unix:run/gunicorn.sock

Deploy Arguments

usage: Bureaucrat deploy [-h] [--venv VENV] [--app APP]
                         [--deployfile DEPLOYFILE] [--envfile ENVFILE]
                         [--logpath LOGPATH]

optional arguments:
  -h, --help            show this help message and exit
  --venv VENV           Virtualenv root
  --app APP             Application root
  --deployfile DEPLOYFILE
                        Deployfile path
  --envfile ENVFILE     .env file path
  --logpath LOGPATH     log file path


$ bureaucrat deploy
Running task syncdb: syncdb --noinput
Running task migrate: migrate --noinput
Running task collectstatic: collectstatic --noinput


This used by Panubo to support Python environments.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bureaucrat-0.3.6.tar.gz (8.1 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page