Skip to main content

Configuration without magic

Project description

cabina

Codecov PyPI PyPI - Downloads Python Version

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


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)

Uploaded Source

Built Distribution

cabina-0.1.0-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

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

Hashes for cabina-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ee96727d4932e0eec582667f420099a4b47fd87b2f98383d28cce6fe49532152
MD5 97b81e342b0eac095acb53b035007e82
BLAKE2b-256 8eed2362d661fda5da6c70da0806b234b788cb05075c5b8b4fe82c7330079ce3

See more details on using hashes here.

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

Hashes for cabina-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 253123440ff07b21d140521887929230dc797d9bdee08ee4f68d165a994be1d6
MD5 01fc22c62c4c8064a69f6e4ac060e1f2
BLAKE2b-256 a72a18c9c4a6c271ce68db2f2307fc2451a433611db3e78ef8a8540847fd9998

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page