Skip to main content

For providing a python application with configuration and/or settings

Project description

application_settings - version 0.3.0

pypi versions Build Status codecov Checked with mypy linting: pylint Code style: black Imports: isort License: MIT

"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.
  • Configuration parameters are read-only (i.e., changed by editing the config file); we recommend (and support) the use of toml for 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 json for 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.

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

application_settings-0.3.0.tar.gz (15.6 kB view details)

Uploaded Source

Built Distribution

application_settings-0.3.0-py3-none-any.whl (13.8 kB view details)

Uploaded Python 3

File details

Details for the file application_settings-0.3.0.tar.gz.

File metadata

  • Download URL: application_settings-0.3.0.tar.gz
  • Upload date:
  • Size: 15.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.11.3 Windows/10

File hashes

Hashes for application_settings-0.3.0.tar.gz
Algorithm Hash digest
SHA256 12299d9584e26a7c2ee2de087d7baf6285963dc91f454fb9ecf1ed45ac4b8399
MD5 58c3c48afcc4100574114da3dd99e2ef
BLAKE2b-256 a3dd21a64a71a5e303050cf82108eefd54668c7e9b44fd785261e91f6f3e7bfc

See more details on using hashes here.

File details

Details for the file application_settings-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for application_settings-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 08ad5546f0943fc196799a07ff359760befe82cf488e0b60068e416ea8b7416f
MD5 3f165221bf9658d7525c47ae0c91d502
BLAKE2b-256 75d5a414db0e1ff331ab607a812fd498fb6420c5fa7099b30d106c2252a0408f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page