DTU Configuration
This package provides a configuration class to get, process, edit and store user input.
It is a thin wrapper around ConfigParser that provides utilities for adding validated configuration options and prompting the user for them, or allowing them to be filled by a CLI.
Usage
from dtu_conf import DtuConfig
app_name = "example_app"
app_author = "author_name"
conf = DtuConfig(app_name=app_name, app_author=app_author)
# Add options.
conf.add_str(
"User metadata", "institution",
input_text="Please enter your institution"
)
conf.add_email(
"User metadata", "email",
input_text="Please enter your email (optional)",
required=False
)
conf.create_config()
Metadata
Release files for dtu-config 0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| dtu_config-0.1.tar.gz | 16.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dtu_config-0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 23.6 kB
Release files / dtu_config-0.1.tar.gz
| Download URL | dtu_config-0.1.tar.gz |
|---|---|
| Size | 16.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0bcbddddf0d8e3251a51158ead803f1ed43a95f53103f19b90b22e2e7bc992f7
|
|
BLAKE2b-256 checksum How to use checksums |
ec5760cc485c5f18d8d09edae3a24f90b20ff7b76866018e4f2d079c1dae5a28
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.9.12
|
Release files / dtu_config-0.1-py3-none-any.whl
| Download URL | dtu_config-0.1-py3-none-any.whl |
|---|---|
| Size | 7.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4e8323bb595be034534aea65b95446cb9b17e76cfeccc4f6e87d5fb7987ab487
|
|
BLAKE2b-256 checksum How to use checksums |
4499ff82850e195bc107f4d2c04df6ab8a36a370964153271e8b715ff7efebe0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.9.12
|