A super hacky way to manage environment specific configuration
Project description
## Yamz
A hacky way to manage environment specific configuration in Python using PyYAML.
### Why Yamz?
All the other names I managed to think of were already taken, so... here we are.
### How to use
- `pip install yamz`
- Configure your environment in `settings.yaml`
- I recommend using environments names such as: `production`, `development`, etc.,
Note: `global` environment settings will be available in all environments
- If you want to include variables from your environment, make sure to add a `$` prefix (`$HOME`) and Yamz will make sure it's included.
```yaml
production:
HOME: $HOME
MYSQL_DB_HOST: 1.2.3.4
MYSQL_DB_PASS: $MYSQL_DB_PASS
```
```python
from yamz import Environment
env = Environment("[BASE_PATH]", "settings.yaml")
prod_env = env.load("production")
prod_env.MYSQL_DB_HOST
```
A hacky way to manage environment specific configuration in Python using PyYAML.
### Why Yamz?
All the other names I managed to think of were already taken, so... here we are.
### How to use
- `pip install yamz`
- Configure your environment in `settings.yaml`
- I recommend using environments names such as: `production`, `development`, etc.,
Note: `global` environment settings will be available in all environments
- If you want to include variables from your environment, make sure to add a `$` prefix (`$HOME`) and Yamz will make sure it's included.
```yaml
production:
HOME: $HOME
MYSQL_DB_HOST: 1.2.3.4
MYSQL_DB_PASS: $MYSQL_DB_PASS
```
```python
from yamz import Environment
env = Environment("[BASE_PATH]", "settings.yaml")
prod_env = env.load("production")
prod_env.MYSQL_DB_HOST
```
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
yamz-0.0.2.tar.gz
(2.2 kB
view hashes)