Skip to main content

Easily configure Python apps via environment variables, YAML, and AWS SSM Param Store.

Project description

Flex Config

triaxtec codecov Code style: black Generic badge MIT license

Configure your applications as easily as possible.

Main Features

Load config from wherever

  1. Comes with built in support for loading from dicts, environment variables, YAML files, and AWS SSM Parameter Store.
  2. Super easy to set up a custom source and load from anywhere.

Path-like lookups for nested values

from flex_config import FlexConfig

flex_config = FlexConfig()
flex_config["app/env"] = "local"
assert flex_config["app"]["env"] == "local"
assert flex_config["app/env"] == "local"

Basic type inference

If the value FlexConfig gets is a string (like you get from SSM and Env), it will try to parse it to a few other types.

  1. Strings that are digits become ints
  2. Numbers with decimals . become floats
  3. Strings contained with { and } will be parsed as JSON
  4. Failing any of the above you just get your string back

Installation

Basic install: poetry install flex_config With all optional dependencies: poetry install flex_config -E all

For a full tutorial and API docs, check out the hosted documentation

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

flex-config-1.0.0.tar.gz (6.5 kB view details)

Uploaded Source

Built Distribution

flex_config-1.0.0-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

Details for the file flex-config-1.0.0.tar.gz.

File metadata

  • Download URL: flex-config-1.0.0.tar.gz
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.5 CPython/3.8.2 Darwin/19.4.0

File hashes

Hashes for flex-config-1.0.0.tar.gz
Algorithm Hash digest
SHA256 2a4434a7d5f613d9dc2ffd41ada65945e7ee266160d5731196746f0a3450ed68
MD5 63a086df1c12b1313e7ed6a22a3a453e
BLAKE2b-256 ffe02cab4428691dcc6cbc3b38978c3448bccf71103dc3414e049cf6e737e313

See more details on using hashes here.

File details

Details for the file flex_config-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: flex_config-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 7.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.5 CPython/3.8.2 Darwin/19.4.0

File hashes

Hashes for flex_config-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 20c758239744a8cfdf089d70dd67f74dbb790250cc45e59f13be189e1438d0b1
MD5 399e3b942eebd9995b9eb14a1c754c81
BLAKE2b-256 e372d3101391e74fc1d657a8ebcf3e383edaa74048a1c9273a5944f66a85080a

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