Skip to main content

Python settings for cloud environments

Project description

Settings Vial

Python settings for cloud environments

image image image image image

Settings Vial is a Python package providing an abstraction to read settings from environment variables. Such settings are then available as regular Python variables, making it easily integrated with configuration mechanisms provided by framworks like Django or others.

This package uses pkgsettings, so it can be used in configuration chains.

On demand setting overrides (dynamic settings), with subtrees of alternative configurations, are also possible.

Usage

$ export MY_APP_TEST_VAR=42
>>> from settings_vial import Settings
>>> settings = Settings(env_prefix="MY_APP_")
>>> settings.load_env()
>>> settings.TEST_VAR
42

Features

  • Loads prefixed environment variables (json encoded)
  • Dynamic settings support (loads keys from callable instead)

Installation

$ pip install settings_vial

Running tests

$ make test

Contributing

If you'd like to contribute, please follow this workflow:

  1. Fork this repository
  2. Clone your fork
  3. Create and test your changes
  4. Create a pull-request
  5. Wait for review and approval from the repository collaborators

Contributions are always welcome.

Support

If you need help or have bug reports, please file an issue in our Issue Tracker.

Versioning

This project uses SemVer 2 for versioning. For the versions available, see the tags on this repository.

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

settings-vial-0.4.0.tar.gz (9.4 kB view details)

Uploaded Source

File details

Details for the file settings-vial-0.4.0.tar.gz.

File metadata

  • Download URL: settings-vial-0.4.0.tar.gz
  • Upload date:
  • Size: 9.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.4.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.7.1

File hashes

Hashes for settings-vial-0.4.0.tar.gz
Algorithm Hash digest
SHA256 dbe8f9accd40bd464ed8f125551427a38bee31cbfec0b1f7ea77ca51260e9997
MD5 a26a82898e61569507a0076293ab357f
BLAKE2b-256 2884f26ec226ff382fbc7874ea39e44d0ca0b2813d79b3adb73bc81dd91c5a0b

See more details on using hashes here.

Supported by

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