Configloaders
Configloaders is a Python library that allows you to easily load configuration from various types of configuration files and inject them into various types of objects, such as classes, dictionaries, functions, and methods.
Installation
You can install Configloaders using pip:
pip install configloaders
Usage
Loading configuration from a file
Configloaders supports loading configuration from various types of configuration files, including YAML, JSON, INI, and Python files.
import configloaders
name = 'jack'
age = 18
configloaders.load(globals())
Injecting configuration into an object or class
Configloaders supports injecting configuration into various types of objects, including classes, dictionaries, functions, and methods.
import configloaders
@configloaders.config
class config:
name = 'jack'
age = 18
Using configuration in a function or method
Configloaders supports using configuration in a function or method by using the @config decorator.
import configloaders
@configloaders.config
def hello(name, age):
print(name, age)
Supported file formats
Configloaders supports the following file formats:
- JSON
- INI
- PICKLE
- PY
- TOML
- TXT
- XML
- YAML
Supported object types
Configloaders supports the following object types:
- Classes
- Dictionaries
- Functions
- Methods
- argparse.ArgumentParser
Contributing
If you would like to contribute to Configloaders, please submit a pull request or open an issue on GitHub.
License
Configloaders is licensed under the MIT License. See the LICENSE file for more information.
Metadata
Release files for configloaders 2.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| configloaders-2.2.2.tar.gz | 10.6 kB | Without provenance | Details for configloaders-2.2.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| configloaders-2.2.2-py3-none-any.whl | Python 3 | none | any | Details for configloaders-2.2.2-py3-none-any.whl |
Total release size: 20.8 kB
Release files / configloaders-2.2.2.tar.gz
| Download URL | configloaders-2.2.2.tar.gz |
|---|---|
| Size | 10.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
01edb64b2608d4e9e7482430376fb7852b89d4835d99b80976958388a4920435
|
|
BLAKE2b-256 checksum How to use checksums |
af0aa589fc07d03a06ccdeb44d311eafa26d7b89bd164c68c3cc4dd79328bed9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.3.1 CPython/3.10.8 Windows/10
|
Release files / configloaders-2.2.2-py3-none-any.whl
| Download URL | configloaders-2.2.2-py3-none-any.whl |
|---|---|
| Size | 10.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
63047181d57e28744375dc2ef5af2922283f26dcb8c253530b8bda65e9da0092
|
|
BLAKE2b-256 checksum How to use checksums |
4d888c18b4890440a8e466a41888416e72ecea466bb924894009c64681009122
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.3.1 CPython/3.10.8 Windows/10
|
Security for configloaders 2.2.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.