Skip to main content

A package to ease usage of different configuration conditions in your projects.

Project description

config-joker

A package to ease usage of different configuration conditions in your projects.

How to use in

Obs.: There are some examples in the examples folder

Import the sources you'll use and the Config class:

from config_joker Config, EnvironmentSource

Initialize the config class implementing the sources you want to use:

config = Config(
        sources=[
            EnvironmentSource()
        ]
    )

Find the configurations you want to use:

import os
os.environ['env_variable'] = '1'
number_one_from_env_source_as_int = config.required(key='env_variable', value_type=int)

The value stored in number_one_from_env_source_as_int will be the number one as an integer.

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

config_joker-0.7.0.tar.gz (4.0 kB view hashes)

Uploaded Source

Built Distribution

config_joker-0.7.0-py3-none-any.whl (6.4 kB view hashes)

Uploaded Python 3

Supported by

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