Configuration without magic
Project description
cabina
Installation
pip3 install cabina
Usage
import cabina
class Config(cabina.Config):
class Main(cabina.Section):
API_HOST: str = "localhost"
API_PORT: int = 8080
class Db(cabina.Section):
HOST: str = "localhost"
PORT: int = 5432
USERNAME: str = "postgres"
PASSWORD: str = ""
assert Config.Main.API_HOST == "localhost"
assert Config["Main"]["API_HOST"] == "localhost"
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
cabina-0.1.0.tar.gz
(3.8 kB
view hashes)
Built Distribution
cabina-0.1.0-py3-none-any.whl
(8.0 kB
view hashes)