Skip to main content

ultra-config

https://img.shields.io/pypi/v/ultra_config.svg https://travis-ci.org/timmartin19/ultra-config.svg?branch=master Documentation Status Updates

An extendable configuration that enables you to configure your application via python modules, config files, environment variables and more!

Installation

pip install ultra-config

Features

  • Load configuration from a variety of sources including environment variables, json files, ini files, and python objects

  • Easily extend with your own configuration mechanisms

  • Offers a global configuration object for you application

  • Easily inject configuration into functions with the ability to override them for testing

  • Ability to fail fast if missing configuration

Examples

global configuration

from ultra_config import GlobalConfig

# Loads all env variables that begin with MY_APP, configuration
# from a json file and a custom override
GlobalConfig.load(env_var_prefix='MY_APP',
                  json_file='/opt/my_app/config.json',
                  overrides={'MY_VAR': 'some_val'})

@GlobalConfig.inject('MY_VAR', value='OTHER_VAR')
def my_func(arg1, value=None):
    print(arg1)
    print(value)

my_func()
# Prints the value of MY_VAR and OTHER_VAR

my_func(value='custom')
# prints the value of MY_VAR and then prints the "custom" since we explicitly passed that in

Credits

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

History

0.1.0 (2016-07-22)

  • First release on PyPI.

Metadata

Release files for ultra_config 0.6.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ultra_config 0.6.3
File Size Uploaded
ultra_config-0.6.3.tar.gz 17.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ultra_config 0.6.3
File Interpreter ABI Platform
ultra_config-0.6.3-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 28.8 kB

Release files / ultra_config-0.6.3.tar.gz

Download URL ultra_config-0.6.3.tar.gz
Size 17.3 kB
Tags Source
SHA-256 checksum
How to use checksums
9f8f1aa20f3216ea068bfd33494cedfef6ba8ee4b3eead139be3880240055e00
BLAKE2b-256 checksum
How to use checksums
b48f79add3516a2dd20091825bbaeb0d557760b11f2a8b620998d9d462295519
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / ultra_config-0.6.3-py2.py3-none-any.whl

Download URL ultra_config-0.6.3-py2.py3-none-any.whl
Size 11.5 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
d3d2b001f801cccb670b6218308086bfbd76a7f59de5e29ac45459e77e5254bc
BLAKE2b-256 checksum
How to use checksums
0b0213d4ccca7c269c4f96d46dd46f9a586f5df9e411e2a2f3d142813427bfdf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.6.3 This release

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.9

2 release files

0.1.7

2 release files

0.1.6

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.0

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page