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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file config_joker-0.7.0.tar.gz.

File metadata

  • Download URL: config_joker-0.7.0.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.2 CPython/3.8.16 Linux/5.15.0-1039-azure

File hashes

Hashes for config_joker-0.7.0.tar.gz
Algorithm Hash digest
SHA256 41bb715630703da6333486fa77eab5019f0a1f2400b5c5b44514d164b9149148
MD5 7447903e585cde5c482a7f8004ad761e
BLAKE2b-256 ccbb8ca4218e01b400c2b43c6833d09bc773775b3c1c433f618f571499852e69

See more details on using hashes here.

File details

Details for the file config_joker-0.7.0-py3-none-any.whl.

File metadata

  • Download URL: config_joker-0.7.0-py3-none-any.whl
  • Upload date:
  • Size: 6.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.2 CPython/3.8.16 Linux/5.15.0-1039-azure

File hashes

Hashes for config_joker-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3691c255520107992b5c4563a3889364033c5509616f63a0e5a072f37d039cd3
MD5 d503ec334bc5e84d5de6d57720216629
BLAKE2b-256 5acfa61b563b26b2f7b3ba8b69d8cec42940a9fb71b14e6124e4a2b7c2cbb48e

See more details on using hashes here.

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