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

Uploaded CPython 3.13Windows x86-64

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

Uploaded CPython 3.13musllinux: musl 1.2+ i686

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

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.12musllinux: musl 1.2+ i686

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

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.11musllinux: musl 1.2+ i686

ruth_configurator-2000.3.14-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.14-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.14-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for ruth_configurator-2000.3.14-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 7cd5daf62d1a63e17519b0334215b37d99521743d880e3934b45e7ad10cfaa20
MD5 99f7a651e2258a591f1d60518b3e3029
BLAKE2b-256 bebf48bed8d6fce29eed045f5e9e3e1ce9844e3282e82c126d1a214449e5998e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ruth_configurator-2000.3.14-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 f55bdfd9096c5c484696a5b2db988f1032581ce32c481b11c20179c3e1297f2d
MD5 dfb0cba32f3571b6fbd2795cfd349546
BLAKE2b-256 e18b08692b912bfd1887ece1e75d140b4d3d45c39d76202ec2a777edfb656ce5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ruth_configurator-2000.3.14-cp313-cp313-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 2659493464857bd3476ece0fac11f4216975ed27ee399070a9b3cec5861ab138
MD5 1b5d000e15045d70b7602534914f4c10
BLAKE2b-256 16e40986fa2e79d43d80728b889f395652ee28dec46ca03df44aacab9d6bb32b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ruth_configurator-2000.3.14-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 25e65852c71b5653a305b77ca488ef0979138b028d7019af001a6d84d23b533d
MD5 815493e59e04c47ad83b225eaaa35a4a
BLAKE2b-256 43979e0b6f7a221cd0e15b5ff8b9918bae4917d1ae52e3d464364dd33495ef6c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ruth_configurator-2000.3.14-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4f5bad10f4a88324dedf07f0cdfba24c5743234c8d989096ea27b637ec68e8a2
MD5 f9e83dcd2d43240bc332284000cef509
BLAKE2b-256 6e753feb6747d58544934ba73ea4f690618f5d796766d153ff6018e3f7103d04

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ruth_configurator-2000.3.14-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 5e4a93c12f2ff00bbd4b6ecbdeefc9625244761187fc2b7a524a9d68d4739ea6
MD5 b5bdf7cc30d8fde7b9c99c11738dd270
BLAKE2b-256 8329738a0aea8359e0b601e10346fa6bdcf4fecd1dff845bf653eb4312888d6d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ruth_configurator-2000.3.14-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 26e99e9ac589b616ea6bbf9456eb9284f9b83cea99250857c6682a41abf54b2e
MD5 9eb7905a07150d83a7112a13b44808e5
BLAKE2b-256 1b54e09f8bac5ad6027c5403dec43164f371e60a8c87e2d78a8ebf1017a2159f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ruth_configurator-2000.3.14-cp312-cp312-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 05301191ec2a587f0d77f0f3983321fe043f253656124087e7031c7bcac98f6b
MD5 3c9e17502ab16aec2d220e1eff290ded
BLAKE2b-256 aa0f03c845a8d4dd88d91aa5f6199e7fcfa83d32aa10adffbdf3b7e16416d227

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ruth_configurator-2000.3.14-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2e6a7b8f2f384f67aa5ae85efd542aebfd54942634b7250808ee34fb5dc4c6a1
MD5 6e5047f12965e22f57c23ba176d46382
BLAKE2b-256 94360327699450bf6081450add3d41031851ad8e801d9bf4d5ff5ea8b514358c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ruth_configurator-2000.3.14-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9d406adf15ea3b601e0ca0f778dbd948cc7bf6be49b45def595bb6c16cc5908e
MD5 8c670d5e5007062a80a2411fd2f54eb8
BLAKE2b-256 a0af1f530df211681c11ebbc865c50395a719d916d989e80c47a1c3e0255ad34

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ruth_configurator-2000.3.14-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 122258c208a6fd671071e50a9a2dea96a8cb51a0cf972faca053e476b344a449
MD5 24184c26fdca2ce92696896b4c4f3ee2
BLAKE2b-256 8e109ce6659b68076b36788fb66a0355fe244590f3053a60df9f73ffc06e66ea

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ruth_configurator-2000.3.14-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 48c74a90def543c3fee0403d2fee70d23e001426982b06ad83edf58df12b1676
MD5 81d213371215627346248acd39598b2b
BLAKE2b-256 6a74ceb71636f01a5a056ac6c193fa64aaa5da743d2c3f93cf91d55233d9276a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ruth_configurator-2000.3.14-cp311-cp311-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 1a2559268f0834917b574c6b4241cc0e03d658f14d208aa5857d1eff525dabd1
MD5 9f9743dbe59358e6376cf820d7afa069
BLAKE2b-256 5997c89c9e8b4639d627455907eba9f00712a915ab077d3fc3b84dfad19ae7f3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ruth_configurator-2000.3.14-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d639733860739c8eb1db05cc617970c07a9f25b86eadb4ac25978c41e249d713
MD5 7eb3139cbc4c04b844dd4d5d0592d39a
BLAKE2b-256 d70a71fd0243453af2ce4390b663b4a8aaf2e4e7a235c81ac54883fd63193654

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ruth_configurator-2000.3.14-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b1652d876bcf84d86625aeec8505e1ef065f50560d022eb5da71a8afb6d900d6
MD5 a0807faae5f0b7643a2b466923a54c0c
BLAKE2b-256 05e107ed7094f5daf026f6f279a31524d3b098db98c85b575cd28a33d5f25aae

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