procfile – a procfile Parser for Python

Installing

Find procfile on PyPI. Install it using pip:

$ pip install procfile

Contributing

Contributions welcome! Fork procfile on GitHub and send in a pull request!

Getting started

import json
import procfile
process_types = procfile.loads('''
web: gunicorn myapp.wsgi
''')
print(json.dumps(process_types, indent=2, sort_keys=True))
{
  "web": {
    "cmd": "gunicorn myapp.wsgi",
    "env": {}
  }
}

API reference

Parser for Procfiles.

Implements Smartmob RFC 1.

procfile.loads(content)

Load a Procfile from a string.

procfile.load(stream)

Load a Procfile from a file-like object.

procfile.loadfile(path)

Load a Procfile from a file.