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.0a2.tar.gz
(6.3 kB
view hashes)
Built Distribution
Close
Hashes for flex_config-2.0.0a2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eb4971c1e91df9e2851fb906a1400e0e2b8c80c1cec64b3d4ff07103d5556d8a |
|
MD5 | bfd49a457717eb69faafecd2b09bb81b |
|
BLAKE2b-256 | b05c9b4fdb27cb74a065c37f663414f0e524702cf8681e106fb6a8f9b97503e7 |