Metadata-Version: 2.1
Name: magicenv
Version: 0.1.0
Summary: Simple way to parse common datatypes from env vars.
Home-page: https://github.com/technocake/magicenv
License: MIT
Keywords: env,magic
Author: technocake
Author-email: robin.garen@gmail.com
Requires-Python: >=3.7,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Project-URL: Repository, https://github.com/technocake/magicenv
Description-Content-Type: text/markdown

# magicenv
Simple way to parse common datatypes from env vars.


# Setup

```bash
pip install magicenv
```

# Usage
```python
from magicenv import env

DB_HOST = env('DB_HOST', "localhost:1234")              # string var
DB_NUM_TRANSACTIONS = env('DB_NUM_TRANSACTIONS', 1234)  # int var
ENABLE_FEATURE_X = env('ENABLE_FEATURE_X', True)  # bool var

DB_SERVERS = env('DB_SERVERS', ['server1', "server2"])  # interprets a comma separated string as a list

```
