Skip to main content

Configuration module from flask, for the rest of the world

Project description

https://travis-ci.org/categulario/itacate.svg?branch=master

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

itacate-1.0.1.tar.gz (7.0 kB view details)

Uploaded Source

Built Distribution

itacate-1.0.1-py2.py3-none-any.whl (7.8 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file itacate-1.0.1.tar.gz.

File metadata

  • Download URL: itacate-1.0.1.tar.gz
  • Upload date:
  • Size: 7.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for itacate-1.0.1.tar.gz
Algorithm Hash digest
SHA256 7d1c38ca51c0aade07779b8f257b3f61c8e568eb7932af881a2ec488f3e6252a
MD5 24c99a4d980ccadfc27e5baf3ddf5aaa
BLAKE2b-256 487c288203c30389fd60603ca33683ea37599522dff03cc7060d312f44d6b8ac

See more details on using hashes here.

File details

Details for the file itacate-1.0.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for itacate-1.0.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 13ca07ef87129e2cba8abf9a5dc7a8f66eafaeccefe4c0e64043f5982d858faf
MD5 b3829e88c890dbfda551b2f30d0fcb51
BLAKE2b-256 dec6f961b088891814731de97e69f558e10d80a24341d85d47cab2eae77c58ed

See more details on using hashes here.

Supported by

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