Skip to main content

Python configuration package

Project description

Configurator

This module try to get all application configurations from files and system environment and stores them as a global object to be used later. Should be called at the beginning of main program.

Examples:

  • load config:

    from tools.configurator import Config, ConfigNode, ConfigLoader, ConfigLoaderIgnore
    Config.load(
        config=ConfigNode(
            config=ConfigLoader(
                path='../configs_folder',  # config files path
                paths=[  # or list of paths
                    './configs_folder_1',
                    './configs_folder_2'
                ],
                env_prefix='env_prefix',
                env_separator='::',
                ignore=ConfigLoaderIgnore(  # files / paths / env-vars to be ignored
                    file='test.py',  # file name
                    files=['test_1.py', 'test_2.py'],  # or list of file names
                    file_mask='test*',  # file name mask
                    file_masks=['templ-*', 'template-*']  # or list of file name masks
                ),
                extension='py',  # file extension
                extensions=['json', 'yaml'],  # or list of file extensions
                order=['env', 'json', 'yaml']  # loading config file order, Last Loaded value overrides Existing value for the same key
            ).config,
            read_only=True  # safe loading, forbid config changes after loading
        )
    )
    
  • config use:

    from tools.configurator import Config
    
    print(f'param: {Config.param_group.param_subgroup.param_name}')
    

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

ruth_configurator-2022.0.0-cp313-cp313-win_amd64.whl (178.0 kB view details)

Uploaded CPython 3.13Windows x86-64

ruth_configurator-2022.0.0-cp313-cp313-musllinux_1_2_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.13musllinux: musl 1.2+ x86-64

ruth_configurator-2022.0.0-cp313-cp313-musllinux_1_2_i686.whl (1.1 MB view details)

Uploaded CPython 3.13musllinux: musl 1.2+ i686

ruth_configurator-2022.0.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

ruth_configurator-2022.0.0-cp313-cp313-macosx_11_0_arm64.whl (191.3 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

ruth_configurator-2022.0.0-cp312-cp312-win_amd64.whl (180.4 kB view details)

Uploaded CPython 3.12Windows x86-64

ruth_configurator-2022.0.0-cp312-cp312-musllinux_1_2_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.12musllinux: musl 1.2+ x86-64

ruth_configurator-2022.0.0-cp312-cp312-musllinux_1_2_i686.whl (1.1 MB view details)

Uploaded CPython 3.12musllinux: musl 1.2+ i686

ruth_configurator-2022.0.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

ruth_configurator-2022.0.0-cp312-cp312-macosx_11_0_arm64.whl (194.1 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

ruth_configurator-2022.0.0-cp311-cp311-win_amd64.whl (181.5 kB view details)

Uploaded CPython 3.11Windows x86-64

ruth_configurator-2022.0.0-cp311-cp311-musllinux_1_2_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.11musllinux: musl 1.2+ x86-64

ruth_configurator-2022.0.0-cp311-cp311-musllinux_1_2_i686.whl (1.1 MB view details)

Uploaded CPython 3.11musllinux: musl 1.2+ i686

ruth_configurator-2022.0.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

ruth_configurator-2022.0.0-cp311-cp311-macosx_11_0_arm64.whl (194.0 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

File details

Details for the file ruth_configurator-2022.0.0-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for ruth_configurator-2022.0.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 be11b4bfddedbfcefae0baa35619d485cdc9f07a7c98ed85e855fb5e26132977
MD5 86647d36b1f11903f48807fceb52c56e
BLAKE2b-256 b906452b8f06683f71672b03f3e63241fc19df61ab19dfe10ecd63a589aa5179

See more details on using hashes here.

File details

Details for the file ruth_configurator-2022.0.0-cp313-cp313-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for ruth_configurator-2022.0.0-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 f84c7bb58130b55cc27ff27ee8d7b42ce049fb1eab4c9a7ab728400968020e81
MD5 e4b4d4eb600b3246c0d18ed5f7b30501
BLAKE2b-256 a7c239577c5ab2145c79e97a20c090ec65b1fd092f832d9e044887495c414caa

See more details on using hashes here.

File details

Details for the file ruth_configurator-2022.0.0-cp313-cp313-musllinux_1_2_i686.whl.

File metadata

File hashes

Hashes for ruth_configurator-2022.0.0-cp313-cp313-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 069f37aee6f76f21f814aea4cf51a9315a2d807626729e9a975106b83ff08d9e
MD5 fcacac1a1c3e477c1e69da578edeef51
BLAKE2b-256 536cf8939579f214e464749efa6818d4b78c4fac3af53361bce43ac139b8571f

See more details on using hashes here.

File details

Details for the file ruth_configurator-2022.0.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for ruth_configurator-2022.0.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5619d306db1c3d55013bf91d70b501a24cf54fee318914489082eb06bd237617
MD5 055add574fdbfc23deefad92d12ea36c
BLAKE2b-256 e3556b6cd238d1b996640460de837dfc1ba5b784c711ca613f04be23606f6326

See more details on using hashes here.

File details

Details for the file ruth_configurator-2022.0.0-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for ruth_configurator-2022.0.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9a7798ad3622efaaf944fe8785d6f92be00c6a5c814d70a6f38245e18515f75a
MD5 b664121c2f9bcb69e6cbd571c77f2b98
BLAKE2b-256 bc7c4ef1db8ff5f5a51b324aec10e9748491c734da3020ee7d1f7a0e72ac7810

See more details on using hashes here.

File details

Details for the file ruth_configurator-2022.0.0-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for ruth_configurator-2022.0.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 41f1c2e3c29ea29c6393105459335c2145ca9b3a921349f8d7c7578ce885c0c9
MD5 bce151dbe78546dc62e56ed4996b238c
BLAKE2b-256 4c6e9aa879dbb8760ae4eab4c134f293f47810f22389b5b5defef9a22790aba7

See more details on using hashes here.

File details

Details for the file ruth_configurator-2022.0.0-cp312-cp312-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for ruth_configurator-2022.0.0-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 f9651aac38493e8e623437cb3098d5de822b416ede6aac42c276674257fbead8
MD5 562703e1c497b4ddf5ff03d8a021480d
BLAKE2b-256 a233c9dbf226db713779f01d0d36d2bc269fb0cdeb90de8e3f9637793028c138

See more details on using hashes here.

File details

Details for the file ruth_configurator-2022.0.0-cp312-cp312-musllinux_1_2_i686.whl.

File metadata

File hashes

Hashes for ruth_configurator-2022.0.0-cp312-cp312-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 77f284e45aa09cec9f4a8991db5de3b4dc9a20a762fcb6a559010654a93fd142
MD5 6347f25098a16338d1459e4c4fc0e1da
BLAKE2b-256 38f5f3281e89131bcca29ae014a7df77634b0a1dfdc472d31389e11448b0032b

See more details on using hashes here.

File details

Details for the file ruth_configurator-2022.0.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for ruth_configurator-2022.0.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b3e4ec8b1111c5244cbb6371396715aff90364bdf21a03048137c9ffdf1d5f5b
MD5 4b0dfa060b86f5a240f751a0a3cb1f6a
BLAKE2b-256 e09fecbe38bacd2b4ce8e9f29f66f73920d25aed55041d993f67870162996c88

See more details on using hashes here.

File details

Details for the file ruth_configurator-2022.0.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for ruth_configurator-2022.0.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c279ebce50f1a494f46ec21e608b5a81377b5c3dfb7756359931728481d6d897
MD5 3e8bd58ba9582aa5d811460fd28fb514
BLAKE2b-256 3b93a714b4969b3eb605e389b2ba03830d744b62058de7f12629edf2e7081e94

See more details on using hashes here.

File details

Details for the file ruth_configurator-2022.0.0-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for ruth_configurator-2022.0.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 192b63df34f649a4dd1c48570e320244c746ddd00548e8cc1f4a5fdc9cfcc6a9
MD5 5a9b02042e4c90dc3abd28136a37c708
BLAKE2b-256 c099edad5e315b822a0306d075ae4fd56d737f363b55336db1113785f20a8c24

See more details on using hashes here.

File details

Details for the file ruth_configurator-2022.0.0-cp311-cp311-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for ruth_configurator-2022.0.0-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 669cef0847a49eb98444b6ce947fca3afceca27349285e794856a1d4f464cdd0
MD5 021dae3e9c3595ff97152adf0629bb6c
BLAKE2b-256 62d2bfe068e11ee11bf30925d9a0be0197541589b3afd5e5c906cdf1d57c516b

See more details on using hashes here.

File details

Details for the file ruth_configurator-2022.0.0-cp311-cp311-musllinux_1_2_i686.whl.

File metadata

File hashes

Hashes for ruth_configurator-2022.0.0-cp311-cp311-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 b2c97be5150c6cdd2d76771181b73d3d763ad148d84e42095ab797d45d17d808
MD5 81d327891bb4f190ea3bc911a31bfe44
BLAKE2b-256 ec07b3f62a6f45dde190231c2541a8764338b81cb7c0eeb488d6de196cfcfc7b

See more details on using hashes here.

File details

Details for the file ruth_configurator-2022.0.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for ruth_configurator-2022.0.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 76c2b270fd3a03c59184957de57a3cc9d61c561ba1c9a6960a84a72eb05e9c70
MD5 acdfd531233778798f2a0a367067ac7d
BLAKE2b-256 82b246662e07d52f4846090a1744dbbd5cddf198d7fa9e3c6d47fc8265da527d

See more details on using hashes here.

File details

Details for the file ruth_configurator-2022.0.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for ruth_configurator-2022.0.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 054671178ebbb13a3f26830a79ff63a81ee28cfe4ea77263f1aefb1183bdffc0
MD5 b6a4ab741e7edef851dab995128e00b7
BLAKE2b-256 4d8d2b0102d26dc39a735875e658058fa9852d8cd2a3cdb2d0a4f263a144c88c

See more details on using hashes here.

Supported by

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