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-2000.3.15-cp313-cp313-win_amd64.whl (160.5 kB view details)

Uploaded CPython 3.13Windows x86-64

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

Uploaded CPython 3.13musllinux: musl 1.2+ x86-64

ruth_configurator-2000.3.15-cp313-cp313-musllinux_1_2_i686.whl (1.0 MB view details)

Uploaded CPython 3.13musllinux: musl 1.2+ i686

ruth_configurator-2000.3.15-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-2000.3.15-cp313-cp313-macosx_11_0_arm64.whl (173.2 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

ruth_configurator-2000.3.15-cp312-cp312-win_amd64.whl (162.9 kB view details)

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.12musllinux: musl 1.2+ x86-64

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

Uploaded CPython 3.12musllinux: musl 1.2+ i686

ruth_configurator-2000.3.15-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-2000.3.15-cp312-cp312-macosx_11_0_arm64.whl (176.2 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

ruth_configurator-2000.3.15-cp311-cp311-win_amd64.whl (163.2 kB view details)

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.11musllinux: musl 1.2+ x86-64

ruth_configurator-2000.3.15-cp311-cp311-musllinux_1_2_i686.whl (1.0 MB view details)

Uploaded CPython 3.11musllinux: musl 1.2+ i686

ruth_configurator-2000.3.15-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-2000.3.15-cp311-cp311-macosx_11_0_arm64.whl (175.6 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

File details

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

File metadata

File hashes

Hashes for ruth_configurator-2000.3.15-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 54a2c24f2fde01f18bfb9fa813488cdbd3990c6e26c9e07b05cc667c34b2a80e
MD5 83bed041f24c794d7057f7cb85043ea6
BLAKE2b-256 de3ca3049fc35cdca2686c1735e169a3b52b263d31dd362265f0124e2d0f3231

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ruth_configurator-2000.3.15-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 0389e658db69d688b9b3aae981d5971e6eb45c7d86d26e0d466db8075cbc3b35
MD5 7dc0b98e5f75876ff2252907fe1850d6
BLAKE2b-256 cc7070bce785bf0e7efa96c09cd51dd4cdbe79000029b71d147ad594a4e899b3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ruth_configurator-2000.3.15-cp313-cp313-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 ab637fdeca64888cf2ec5779165158b577dbcf6c100b025e40afc05911c396a8
MD5 8d5c8e0fbd7d8a94b87f828b48bca7a8
BLAKE2b-256 df60545381493f12a449e9a9d687c4998b69429eddf98f560e5fffef2726d3b3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ruth_configurator-2000.3.15-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8ddea5071ebb30fd2af54987861cb2ef76219857f3e560d3d3d695c3f3456301
MD5 566e6d0418c63f290ef5c415d6de0f1b
BLAKE2b-256 264739857fd72a29a4e43da9e0e3d47e5d298be20283d0547141ebd0628d6f8a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ruth_configurator-2000.3.15-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 095e383f42df369983bb935c37897de40180aad6ce0ea926d65c0850fc23848a
MD5 f7ad2f931afa094d7b9f73e2958d4faf
BLAKE2b-256 3086161546c517a51bd79870c54677855ddebbddf3b35110cd18dff5888fb0fe

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ruth_configurator-2000.3.15-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 958f8f66891d8e1725c6c5f3483d5d81e8864db954af0ebeb1b699a434113b9b
MD5 2e41de13dbfac1b62a2d946c82b4ae05
BLAKE2b-256 265895f5b737679330b5dcc77a5fb4ce125a569d7f22351cfeb206e006abf7f5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ruth_configurator-2000.3.15-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 0873864c8f8707e2f5b4568e1492092b241808b29c5c18607e60dbdc436b1c25
MD5 cd1cb7fef47121f4b6f4716923d54f43
BLAKE2b-256 c817658397aa6c9640fff49cbee60130698d459b2b533dcd56d41ed4334a240c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ruth_configurator-2000.3.15-cp312-cp312-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 2394cb42e1557f779a7270c09de30f931ad3b01a317f3f3f53b3dd1217062c30
MD5 74a7e3a4bcacf0f2baab7886fee7f444
BLAKE2b-256 348589f59c492aeefcea50c74ba1cbbed13252118ba6193141849e8272bd1dc4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ruth_configurator-2000.3.15-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8aa7ad73633c348e37d484cd4534e4a43d34e258073f8fd96859f1a7a57d4511
MD5 0d39233e2475d18fdbe443e21a0a696e
BLAKE2b-256 ed61cd1a4c445943c62484884a76197a48aa5a86ad44a8d6853b4c04929d4d41

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ruth_configurator-2000.3.15-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 aa9ea76366d61fff7e8043fa5247c4b8f34a01cad40b4aec4b50164d76d9e96f
MD5 db8c714738ee9141da8c162960a07060
BLAKE2b-256 4b70fa4861fba32016cbdc3966f463cfc19398bfbf5e8cc8fb529674711027df

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ruth_configurator-2000.3.15-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 ea6471cba51179ba47acc65d3436775523c4699485231ad07b0764535c673a73
MD5 37720f5493fed3929d1e0e5ec1995336
BLAKE2b-256 fa83701852a25110b104e953bf1f8eb6a292c72e367fb678f0aaf2b6fb9c9646

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ruth_configurator-2000.3.15-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 e4e7030b425e5c34b0328c2ddfe037bb0cabdc120ebd29050ee1c6923ce6a254
MD5 6fec842eb6359ac0293b9da602633685
BLAKE2b-256 e503ee435e62f9967359a2a557f300554f9650624cec642c4f56f8a52db90e09

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ruth_configurator-2000.3.15-cp311-cp311-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 9d192ffdb9ab86f60642ffb879d19f650d78be6fcb7adf902edc2b6a41a478f1
MD5 0ed949ed9519768ae4095007967a9567
BLAKE2b-256 fd6eee643ffbc85a324b0e59b9a2bea2ac641d554f28a8fab56c109810feb49a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ruth_configurator-2000.3.15-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2c38993a695ca9722397b6110aceb6995e25c008bc2cbdafe1fad266a0d4dd35
MD5 5670b5970c8fb3329f535e6e53c2f345
BLAKE2b-256 da93c8385af9b051035fa6d97e54d8a863d5466c1e8c74d20b5a9199a377a414

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ruth_configurator-2000.3.15-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 2b2c44f5de0451e0aa60028dafb76fe207f05df36ac25769ad7a1167bfbcb8e7
MD5 2d923bb64c6e37bbaa327fec14a3954c
BLAKE2b-256 0c361835faa11134ad8edf0550dd092112fa99083bb6d9f3c5e1906e32d9d627

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