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

Uploaded CPython 3.13Windows x86-64

ruth_configurator-2000.3.13-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.13-cp313-cp313-musllinux_1_2_i686.whl (1.0 MB view details)

Uploaded CPython 3.13musllinux: musl 1.2+ i686

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

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.12Windows x86-64

ruth_configurator-2000.3.13-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.13-cp312-cp312-musllinux_1_2_i686.whl (1.1 MB view details)

Uploaded CPython 3.12musllinux: musl 1.2+ i686

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

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.11Windows x86-64

ruth_configurator-2000.3.13-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.13-cp311-cp311-musllinux_1_2_i686.whl (1.0 MB view details)

Uploaded CPython 3.11musllinux: musl 1.2+ i686

ruth_configurator-2000.3.13-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.13-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.13-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for ruth_configurator-2000.3.13-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 4ed6586bb56f4ac3e75ae4ef5106f064f1e87f2e4f7a4bc81d1117267c4e492f
MD5 e11ef1f6c183dd911fa10dbaf745aaac
BLAKE2b-256 67b13faeedc6801fe96e311cacfcd219ce385efea8cfe0715b9c9b25904d15bf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ruth_configurator-2000.3.13-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 f295e48954e284882cba62f0ed046bd5fb141a290837d9b3361c9f49bc9d00fb
MD5 e532297257ddc92ef58f571dc9452832
BLAKE2b-256 a0a4adfbcea608a33e94589e7ef4b98008372096706c58eac8f5578bf0340dee

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ruth_configurator-2000.3.13-cp313-cp313-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 042fe44cf54e522b2c53d20c9e3c4e1e78404b79c84bda667c10506bc295e530
MD5 15bae3ae20c910099ba904850f97eb2f
BLAKE2b-256 666998727d60e3f38110705bb444c1a71b5124fb74290ed6e85b1bc9b6ee8939

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ruth_configurator-2000.3.13-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7bf5ad95883df7d8e09e7aea3c5366bcc9eb01c8910758dd741fa2d1482b61f8
MD5 f5c1d143231984f8ffdbebe64e311081
BLAKE2b-256 16649deb00a6b47da54fbd6c30f912c2d43e3b83af84f5441b8832ead6f43f80

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ruth_configurator-2000.3.13-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 55d57ac5012a756c74582488f3637e5b16370986c18aff2f781391334496a6cb
MD5 e146df7030b9702d8dc7a3a47d670da6
BLAKE2b-256 23f162fdd26b2a31be519b6c0eeb136e6ce0ece624f773f1b6ec22816c414f26

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ruth_configurator-2000.3.13-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 205748f221e73dab9428c250903d6b0c4e0234ef5d6c74017e17743984056b7c
MD5 761a968b541085b9f184c4a10ea6bd45
BLAKE2b-256 afe0c7c9cbcca72c1e7e5ad85674d472f8fcf13f42e31c325a3506380b1926f3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ruth_configurator-2000.3.13-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 00f6a9798736501755386831ed5ae5c1c6633b5900025d4d9511559fb9195080
MD5 ae6accf40318500bbe690574ba4443e7
BLAKE2b-256 9c6babf64c1a6ea84736c659ba40c61d9b564082d8a16d7f5206a12acd8f46a8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ruth_configurator-2000.3.13-cp312-cp312-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 ca4d4cbc6a275d2739ca827e4da7ae178037913844a005c14bbb04fda326d30f
MD5 34b439774a16554f58b744e8b7fdab33
BLAKE2b-256 a0a517582cd5a933cd661a486e0bea63ebc07dda1967eb11eea20639b2e4eef1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ruth_configurator-2000.3.13-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 673406c95d9601da1a6b5d90c200832065f881cc6ee300acce831f6a90a818b3
MD5 2cbf6b29cc41c9851f4c689405426841
BLAKE2b-256 8296ff5c8e4e87b83b1c9e9886b804a5b6bdd641cdfff9361d2ed1b2f718728e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ruth_configurator-2000.3.13-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b8a990bde661d90b6109569d6af5d3a8f3eb3d543cc3067549ce28f02af4fb7b
MD5 e81778bf826898e7b39d540e4af6f5ef
BLAKE2b-256 90d42d01fdfa3ee202a9863e6cf0eb663ffddfc6d68e892edf5639c92fcfc8ae

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ruth_configurator-2000.3.13-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 83f403d1054cce1df9d0c06069e635ef433a5d8d8df5506c6095c9342830978b
MD5 0847bb7f6d7dc58ebc4b77d89ab4eaff
BLAKE2b-256 c5a859c1631cd6fc00059c03de8bfb099bf9d9da803a3f675adde18fd0dc098b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ruth_configurator-2000.3.13-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 969d88934616877d2f3f7805ecb85417ac695efdc0ff76c8c420bb2d4b272098
MD5 57a568ef7ac620ea1182c2a2eae89808
BLAKE2b-256 7348f2ece1cf9429409787bc44afcd73ddd7bfe1dee4d76815b4c8816fa3057b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ruth_configurator-2000.3.13-cp311-cp311-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 41fa7ba5a8b5023198a531bc8d0f616f44a4283f08a8b1ff1da0e6e985c4cc2a
MD5 3a3ad810c9f8be2df1ac1294e1503e17
BLAKE2b-256 98427c2a46bb9c79ff662e45c98a1a5545e3b6bdc3b7626c35a7978db7b45c8e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ruth_configurator-2000.3.13-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e1f13e5fb6eebbf9880da84be9f1f225f9464fe7d7868e25b4482db3d7bcf872
MD5 b397fdc919a8b671b325b3088027cb7e
BLAKE2b-256 6034b63477a939eb07beca76fc3b00bc91932555853cce2101be05ead23b8e15

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ruth_configurator-2000.3.13-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0ecbcb6808a4e42469f8378aa22d926c729a24979379f7cfb5c7420ab58a824c
MD5 71926fb32c418e14b143105986bb3b3b
BLAKE2b-256 5e81e2bf00304e674688a1e5f2ca6fe3c6141f5d0d4ceec77cab3c88baa42ed5

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