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_config 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()
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
dtu_config-0.2.0.tar.gz
(16.4 kB
view details)
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 dtu_config-0.2.0.tar.gz.
File metadata
- Download URL: dtu_config-0.2.0.tar.gz
- Upload date:
- Size: 16.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/4.0.2 CPython/3.10.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
60082af642d235d776b379ee44a49d47d7bae18658275a0f40ef132c198f3c7f
|
|
| MD5 |
2e45a04275b117f6d45d1bf59e402496
|
|
| BLAKE2b-256 |
e9103c9023a1af55be6bf28060caae1ea4cb4a9b989eea20780a711293e7e07d
|
File details
Details for the file dtu_config-0.2.0-py3-none-any.whl.
File metadata
- Download URL: dtu_config-0.2.0-py3-none-any.whl
- Upload date:
- Size: 7.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/4.0.2 CPython/3.10.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1ee3d0570d78d426b0742a2307e6746d680345e8eab381f146a8ea410ba270bc
|
|
| MD5 |
9d2c39b44ab1807b05d51d3bca05d385
|
|
| BLAKE2b-256 |
db77858ce725c3220434c2147b19ce989cccf23bc07128472a90c12d2472de57
|