Skip to main content

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()

Release files for dtu-config 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dtu-config 0.2.0
File Size Uploaded
dtu_config-0.2.0.tar.gz 16.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for dtu-config 0.2.0
File Interpreter ABI Platform
dtu_config-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 23.8 kB

Release files / dtu_config-0.2.0.tar.gz

Download URL dtu_config-0.2.0.tar.gz
Size 16.4 kB
Tags Source
SHA-256 checksum
How to use checksums
60082af642d235d776b379ee44a49d47d7bae18658275a0f40ef132c198f3c7f
BLAKE2b-256 checksum
How to use checksums
e9103c9023a1af55be6bf28060caae1ea4cb4a9b989eea20780a711293e7e07d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.13

Release files / dtu_config-0.2.0-py3-none-any.whl

Download URL dtu_config-0.2.0-py3-none-any.whl
Size 7.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1ee3d0570d78d426b0742a2307e6746d680345e8eab381f146a8ea410ba270bc
BLAKE2b-256 checksum
How to use checksums
db77858ce725c3220434c2147b19ce989cccf23bc07128472a90c12d2472de57
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.13

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page