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

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

from config_joker.sources.environment import EnvironmentSource
from config_joker.config import Config

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)

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.1.0.tar.gz (2.5 kB view hashes)

Uploaded Source

Built Distribution

config_joker-0.1.0-py3-none-any.whl (3.7 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