Minimalistic configuration finder with standard Python libraries.
Project description
Config Finder
Finds a configuration file (e.g. pyproject.toml) and returns some sub-configuration by only using python standard libraries.
Supported formats:
- TOML
- JSON
- INI
- YAML (see Documentation how to enable)
Use Case
When defining machine learning projects and handling the project configuration by e.g. a pyproject.toml (e.g. with Astral UV or Poetry) you can utilize the configuration files to define and store important variables.
Instead of defining global variables in your code or using dotenv, a configuration file such as the pyproject.toml can be used for those values.
Example
Instead of defining global variables, just define these parameters in the pyproject.toml
[tool.some_tool]
key1 = "some_value_1"
key2 = "some_value_2"
[tool.some_tool.default_config]
important_key = "some_value"
[tool.some_tool.special_config]
important_key = "another_value"
To get the key for your default_config just call
find_configuration("pyproject.toml", ["tool", "some_tool", "default_config"])
{"important_key" : "some_value"}
and respectively for your special_config use
find_configuration("pyproject.toml", ["tool", "some_tool", "special_config"])
{"important_key" : "another_value"}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file simpleconfigfinder-0.3.2.tar.gz.
File metadata
- Download URL: simpleconfigfinder-0.3.2.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0099758f57e3e341273faca019143b443780b0cb1ada0d98296fe500d2de58ac
|
|
| MD5 |
1e1631cb9453026e4074fb5ee1b75241
|
|
| BLAKE2b-256 |
2a153d17ebd9ce919221e50433b0b9ce36ddb544e0b31cd19b703eaba4159b1a
|
Provenance
The following attestation bundles were made for simpleconfigfinder-0.3.2.tar.gz:
Publisher:
python-publish.yml on fabfabi/simpleconfigfinder
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
simpleconfigfinder-0.3.2.tar.gz -
Subject digest:
0099758f57e3e341273faca019143b443780b0cb1ada0d98296fe500d2de58ac - Sigstore transparency entry: 264773185
- Sigstore integration time:
-
Permalink:
fabfabi/simpleconfigfinder@2a41a9ad26c2d466c0721c38d0152a0c3d042f4b -
Branch / Tag:
refs/tags/0.3.2 - Owner: https://github.com/fabfabi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@2a41a9ad26c2d466c0721c38d0152a0c3d042f4b -
Trigger Event:
release
-
Statement type:
File details
Details for the file simpleconfigfinder-0.3.2-py3-none-any.whl.
File metadata
- Download URL: simpleconfigfinder-0.3.2-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
500f8fd0c6fd9c377a2ffecb5f9f567c06a4f256c3ab10deafed0542832114fe
|
|
| MD5 |
07b948f0192fd236d11828f4a17afb2b
|
|
| BLAKE2b-256 |
a446080afd401418b60077ba8bd69958177d4fb721ac75c53be6ee0adc2b56c9
|
Provenance
The following attestation bundles were made for simpleconfigfinder-0.3.2-py3-none-any.whl:
Publisher:
python-publish.yml on fabfabi/simpleconfigfinder
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
simpleconfigfinder-0.3.2-py3-none-any.whl -
Subject digest:
500f8fd0c6fd9c377a2ffecb5f9f567c06a4f256c3ab10deafed0542832114fe - Sigstore transparency entry: 264773186
- Sigstore integration time:
-
Permalink:
fabfabi/simpleconfigfinder@2a41a9ad26c2d466c0721c38d0152a0c3d042f4b -
Branch / Tag:
refs/tags/0.3.2 - Owner: https://github.com/fabfabi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@2a41a9ad26c2d466c0721c38d0152a0c3d042f4b -
Trigger Event:
release
-
Statement type: