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 details)
Built Distribution
File details
Details for the file cabina-0.1.0.tar.gz
.
File metadata
- Download URL: cabina-0.1.0.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
ee96727d4932e0eec582667f420099a4b47fd87b2f98383d28cce6fe49532152
|
|
MD5 |
97b81e342b0eac095acb53b035007e82
|
|
BLAKE2b-256 |
8eed2362d661fda5da6c70da0806b234b788cb05075c5b8b4fe82c7330079ce3
|
File details
Details for the file cabina-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: cabina-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
253123440ff07b21d140521887929230dc797d9bdee08ee4f68d165a994be1d6
|
|
MD5 |
01fc22c62c4c8064a69f6e4ac060e1f2
|
|
BLAKE2b-256 |
a72a18c9c4a6c271ce68db2f2307fc2451a433611db3e78ef8a8540847fd9998
|