{"repo":"sloria/environs","free":true,"listed":false,"github":"https://github.com/sloria/environs","clone":"git clone https://github.com/sloria/environs.git","description":"simplified environment variable parsing","language":"Python","stars":1373,"topics":["environment-variables","configuration","twelve-factor","python","marshmallow","django","flask"],"license":"MIT","category":"deployment-docker-iac","readme_excerpt":"environs: simplified environment variable parsing environs is a Python library for parsing environment variables. It allows you to store configuration separate from your code, as per The Twelve-Factor App methodology. Contents - Features - Install - Basic usage - Supported types - Reading .env files - Reading a specific file - Handling prefixes - Variable expansion - Validation - Deferred validation - URL schemes - Serialization - Reading Docker-style secret files - Defining custom parser behavior - Usage with Flask - Usage with Django - Why\\...? - Why envvars? - Why not os.environ ? - Why another library? - License Features - Type-casting - Read .env files without mutating os.environ - Validation - Define custom parser behavior - Framework-agnostic, but integrates well with Flask and Django Install pip install environs Basic usage With some environment variables set... Parse them with environs... Supported types The following are all type-casting methods of Env : - env.str - env.bool - env.int - env.float - env.decimal - env.list (accepts optional subcast and delimiter keyword arguments) - env.dict (accepts optional subcast keys , subcast values , delimiter , and key value delimiter keyword arguments) - env.json - env.datetime - env.date - env.time - env.timedelta (assumes value is an integer in seconds, or an ordered duration string like 7h7s or 7w 7d 7h 7m 7s 7ms 7us ) - env.url - This returns a urllib.parse.ParseResult and therefore expects a ParseResult for its default. ","default_branch":null,"files":null,"tree":[],"storefront":"/r/sloria","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/sloria/environs/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}