Easily configure Python apps via environment variables, YAML, and AWS SSM Param Store.
Project description
Flex Config
Configure your applications as easily as possible.
Main Features
Load config from wherever
- Comes with built in support for loading from dicts, environment variables, YAML files, and AWS SSM Parameter Store.
- 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.
- Strings that are digits become ints
- Numbers with decimals
.
become floats - Strings contained with
{
and}
will be parsed as JSON - 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
Release history Release notifications | RSS feed
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-2.0.0a1.tar.gz
(6.2 kB
view details)
Built Distribution
File details
Details for the file flex-config-2.0.0a1.tar.gz
.
File metadata
- Download URL: flex-config-2.0.0a1.tar.gz
- Upload date:
- Size: 6.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.9.0 Linux/5.4.0-1031-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4caccc6f603e64e9682b1e5946bac9a84cabce6fde200e20358818e5f4c82f81 |
|
MD5 | 5295ffe979d1aabf91b95faf9a26b8b3 |
|
BLAKE2b-256 | 3bebb94a3c0c6d2f1b777481760ecdc8c457b41f425390faeb9e04d796ae7d4e |
File details
Details for the file flex_config-2.0.0a1-py3-none-any.whl
.
File metadata
- Download URL: flex_config-2.0.0a1-py3-none-any.whl
- Upload date:
- Size: 7.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.9.0 Linux/5.4.0-1031-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fdf3e84a97ca6c4ef1f6fb62c4af7f6218361cb489755b3fc7bba43f6bd5c6f8 |
|
MD5 | 086c64256167d6cac9cc2d4d60028f38 |
|
BLAKE2b-256 | 59b4702d26fdf67c32471287c23ac46d681fb44d8b839a290174c1df3bf2a33e |