Skip to main content

Multi-profile supported, flexible config library

Project description



Python Package Build Status Server Dependency Status Code Quality Server Test Coverage License

Multi-profile supported, flexible config library for Python 2 & 3.


  • Allow multiple config profiles in one YAML file
  • Allow include multiple YAML files
  • Overridable profile selection from code for special use-cases (e.g. config for testing)
  • Inheritable config profiles, what makes profile merges by dictionaries. (the native YAML bookmarking is also available)
  • Can use variables in the config file


pip install octoconf

Config format

An octoconf config file is pure YAML file with some reserved keywords:

  • USED_CONFIG>: <node_name> in the file root
    you can specify the name of default config profile
  • <INCLUDE: <yml_path(s)> in the file root
    this octoconf file(s) will be included
  • <BASE: <node_name> in the 2nd level
    this will used for making (merge based) inheritance between profiles

The profile nodes should be on 1st level!


  • You can load config from string with loads():
    import octoconf
    config = octoconf.loads(yaml_string)
  • Or directly from StringIO (e.g. from file) with load():
    import octoconf
    with open('config.yml') as fd:
        config = octoconf.load(fd)

Please check the features docs for explain octoconf’s features.

Examples YAML files

USED_CONFIG>: UserConfig
<INCLUDE: vendor.defaults.yml

# This config overrides the production preset (from vendor.defaults.yml file)
  <BASE: ProductionConfig

    TITLE: "Amazing Foobar"

    SQLALCHEMY_DATABASE_URI: "sqlite:///${SERVER}/app.sqlite"

For more examples, please check the examples directory.


Bugs or suggestions? Visit the issue tracker.

Project details

Download files

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

Files for octoconf, version 0.2.2
Filename, size File type Python version Upload date Hashes
Filename, size octoconf-0.2.2-py2.py3-none-any.whl (4.9 kB) File type Wheel Python version 2.7 Upload date Hashes View
Filename, size octoconf-0.2.2.tar.gz (17.7 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page