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.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.0.1.tar.gz | 16.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dtu_config-0.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 23.7 kB
Release files / dtu_config-0.0.1.tar.gz
| Download URL | dtu_config-0.0.1.tar.gz |
|---|---|
| Size | 16.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0fc779bb4f09b5ff77bfc53f20204a066d2f7bbb625f632d347a2a339a20b1d2
|
|
BLAKE2b-256 checksum How to use checksums |
2c7721a4fe8c9d3d461d61bc8ac61827297ea153f3c28db18b8dfcb4e7e0c999
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2
|
Release files / dtu_config-0.0.1-py3-none-any.whl
| Download URL | dtu_config-0.0.1-py3-none-any.whl |
|---|---|
| Size | 7.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4328ff207b12e27d4c113f721f07accc5592cb626636534c3207c57c1a9e25c7
|
|
BLAKE2b-256 checksum How to use checksums |
5306bff31177a63605af85beac71e7451ed248961693a2e420180f216f6ce49d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2
|