Configuration module from flask, for the rest of the world
Project description
[![Build Status](https://travis-ci.org/categulario/itacate.svg?branch=master)](https://travis-ci.org/categulario/itacate)
Itacatl: Provisión de comida que se lleva para un viaje o un paseo, o que ha sobrado de una fiesta y se da a algunos invitados.
El módulo de configuración de flask para el resto del mundo, por que me gusta cómo funciona. Escribe tus configuraciones en archivos python e impórtalas según el entorno, sobreescribiéndolas en cascada.
The config module from flask for the rest of the world, just because I like how it works. Write your config files in normal python files and import them depending on environment variables. Overwrite them in cascade.
Cómo usar / Usage
# settings.py
DEBUG = False
BE_MAGIC = True
SECREY_KEY = ''
# settings_develop.py
DEBUG = True
SECREY_KEY = 'lalala'
# module.py
from itacate import Config
import os
config = Config(os.path.dirname(os.path.realpath(__file__)))
config.from_pyfile('settings.py')
config.from_envvar('MY_APP_SETTINGS', silent=False) # export MY_APP_SETTINGS=/path/to/settings_develop.py
assert config.DEBUG == True
assert config.BE_MAGIC == True
assert config.SECREY_KEY == 'lalala'
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
Built Distribution
File details
Details for the file itacate-1.0.0.tar.gz
.
File metadata
- Download URL: itacate-1.0.0.tar.gz
- Upload date:
- Size: 7.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 86de5656caa624a76fa84206ef16dd30a2eef4b843362b0e916f1a9bac736e47 |
|
MD5 | fb31deaf877006cfbc60a78bfc43d286 |
|
BLAKE2b-256 | 77077a33b9e18b3731d925ddd3d4b5894ba4b4fb672b2beebe0c53accc7dba12 |
File details
Details for the file itacate-1.0.0-py2.py3-none-any.whl
.
File metadata
- Download URL: itacate-1.0.0-py2.py3-none-any.whl
- Upload date:
- Size: 7.8 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 203599f3f033216e0f01b8b43060ff8d84de753541722d837e51f31f64a7eb5f |
|
MD5 | 4c3452dad8a5fbe459e081aa66b0dadb |
|
BLAKE2b-256 | 804bb9b063279b6d27d1fb7142c2e91422b27b84bff014ab973e07c9c2b86b18 |