I hereby claim:
- I am cranti on github.
- I am cranti (https://keybase.io/cranti) on keybase.
- I have a public key ASC9639k47awdbcg8LgJW0mMvOWmHknep1vAsnQWB2-FxAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
from grift import DictLoader, EnvLoader | |
# For this example, the following environment variables should be set: | |
# AWS_SECRET_KEY='supersecret' | |
# PORT='5001' | |
# A DictLoader will be used as a lower priority source: | |
low_priority = { | |
'DATABASE_URL': 'postgres://localhost:5432', | |
'PORT': 5002 |
from grift import BaseConfig, ConfigProperty | |
from grift.property_types import PostgresType | |
from schematics.types import BooleanType, StringType, IntType | |
class AppConfig(BaseConfig): | |
AWS_SECRET_KEY = ConfigProperty(property_type=StringType(), exclude_from_varz=True) | |
DATABASE_URL = ConfigProperty(property_type=PostgresType(), exclude_from_varz=True) | |
DEBUG = ConfigProperty(property_type=BooleanType(), default=False) | |
PORT = ConfigProperty(property_type=IntType(), default=5000) |