For providing a python application with configuration and/or settings
Project description
application_settings - version 0.5.0
"You write the dataclasses to define parameters for configuration and settings, application_settings takes care of the logic."
What and why
Application_settings is a package for providing a python application or library with parameters for configuration and settings. It uses toml or json files that are parsed into dataclasses. This brings some benefits:
- Minimal work for the developer of the application / library
- Parameters are typed, which allows for improved static code analyses.
- IDEs will provide helpful hints and completion when using the parameters.
- More control over what happens when a file contains mistakes (by leveraging the power of pydantic).
- Possibility to specify defaults when no file is found or entries are missing, i.e., aim for "zeroconf".
- Configuration parameters are read-only (i.e., changed by editing the config file); we
recommend (and support) the use of
tomlfor this, which is a human-oriented, flexible, standardardized and not overly complex format. - Settings parameters are read-write (i.e., mostly changed via the UI of the
application); we recommend (and support) use
jsonfor this, an established standardized machine-oriented format.
Parsing is done once before or during first access and the resulting set of parameters is stored as a singleton.
Interested? Then have a look at our quick start or dive into the full documentation.
If you appreciate this library package, then please give us a star on Github.
License
This project is licensed under the terms of the MIT license.
Project details
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 application_settings-0.5.0.tar.gz.
File metadata
- Download URL: application_settings-0.5.0.tar.gz
- Upload date:
- Size: 22.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.0 CPython/3.12.1 Windows/11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
86891a52ac0661d0b6b17b727e902ebcd3beb14ed8d9eb7394def0c427e585ee
|
|
| MD5 |
d4d91e398431e840c3cedba767e69e95
|
|
| BLAKE2b-256 |
a12a752590cf49dbd4997ff3b07f729f8432ee67dc5a547887d629ca2bf1def0
|
File details
Details for the file application_settings-0.5.0-py3-none-any.whl.
File metadata
- Download URL: application_settings-0.5.0-py3-none-any.whl
- Upload date:
- Size: 20.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.0 CPython/3.12.1 Windows/11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cef62e89da8c44604b12515c7ac22fb23b9c95e317e87ee93a4273b1b0d084c6
|
|
| MD5 |
6104dd761137767e694209a2571c25aa
|
|
| BLAKE2b-256 |
a8cc72065009ba4fa19a9f9a3522183fee394db8162f65dc4fda7069f3717c8a
|