<gh_stars>0
# -*- coding: utf-8 -*-
"""Application configuration."""
import os, datetime
import simplekv.memory

class Config(object):
    """Base configuration."""

    #SECRET_KEY = os.environ.get('MYFLASKAPP_SECRET', 'secret-key')  # TODO: Change me
    SECRET_KEY = '<KEY>' #csrf
    EMAIL_KEY = '<KEY>' # email verification url server sign
    EMAIL_SALT = '5yWHy0BJhZHsmztTgEWBN85e1pfcST0NeRqHgZnYbpReX65C8zHEuf7Ll5JDcRMK'# email verification url server salt
    API_SALT = 'rZaz0baIqkRcGgHJkF3wlrIr3MSXlfuxZn0FFyGJcDIwehSaaMxk7IgoiHeG3XLy'  # api server signature for signing tokens.
    APP_DIR = os.path.abspath(os.path.dirname(__file__))  # This directory
    PROJECT_ROOT = os.path.abspath(os.path.join(APP_DIR, os.pardir))
    BCRYPT_LOG_ROUNDS = 13
    ASSETS_DEBUG = False
    DEBUG_TB_ENABLED = False  # Disable Debug toolbar
    DEBUG_TB_INTERCEPT_REDIRECTS = False
    CACHE_TYPE = 'simple'  # Can be "memcached", "redis", etc.
    SQLALCHEMY_TRACK_MODIFICATIONS = False
    MAPBOX_ACCESS_TOKEN = '<KEY>'

    #jwt
    JWT_BLACKLIST_ENABLED = True
    JWT_BLACKLIST_STORE = simplekv.memory.DictStore()
    JWT_BLACKLIST_TOKEN_CHECKS = 'refresh'
    JWT_ACCESS_TOKEN_EXPIRES = datetime.timedelta(minutes=30)

    # mail settings
    MAIL_SERVER = 'smtp.gmail.com'
    MAIL_PORT = 587
    MAIL_USE_TLS = True
    MAIL_USE_SSL = False
    # gmail authentication
    MAIL_USERNAME = ''
    MAIL_PASSWORD = ''
    # mail accounts
    MAIL_DEFAULT_SENDER = ''

    # async celery -enable fernet encryption
    CELERY_BROKER_URL = 'amqp://guest:@127.0.0.1:5672//'
    CELERY_RESULT_BACKEND = 'amqp://guest:@127.0.0.1:5672//'

    #mobile
    TWILIO_ACCOUNT_SID = 'AC<KEY>'
    TWILIO_AUTH_TOKEN = '<PASSWORD>'
    TWILIO_NUMBER = '+12048099756'

    #compression
    COMPRESS_MIMETYPES = 'application/json'
    COMPRESS_LEVEL = 6
    COMPRESS_MIN_SIZE = 500

class ProdConfig(Config):
    """Production configuration."""

    ENV = 'prod'
    DEBUG = False
    SQLALCHEMY_DATABASE_URI = 'postgres://rsabrgeoknimft:XEkvI6vNbQp7D20xrK-Cklr8xo@ec2-204-236-228-77.compute-1.<EMAIL>.com:5432/dck08qjrmev1uv'  # TODO: Change me
    DEBUG_TB_ENABLED = False  # Disable Debug toolbar
    SESSION_COOKIE_SECURE = True
    SESSION_COOKIE_HTTPONLY = True
    WTF_CSRF_ENABLED = True
    BCRYPT_LOG_ROUNDS = 13

class DevConfig(Config):
    """Development configuration."""

    ENV = 'dev'
    DEBUG = True
    DB_NAME = 'dev.db'
    # Put the db file in project root
    DB_PATH = os.path.join(Config.PROJECT_ROOT, DB_NAME)
    SQLALCHEMY_DATABASE_URI = 'sqlite:///{0}'.format(DB_PATH) # memorydb 'sqlite://'
    DEBUG_TB_ENABLED = True
    CACHE_TYPE = 'simple'  # Can be "simple", "memcached", "redis", etc.
    WTF_CSRF_ENABLED = False
    TRAP_HTTP_EXCEPTIONS = True


class TestConfig(Config):
    """Test configuration."""

    TESTING = True
    DEBUG = True
    SQLALCHEMY_DATABASE_URI = 'sqlite://'
    BCRYPT_LOG_ROUNDS = 4  # For faster tests; needs at least 4 to avoid "ValueError: Invalid rounds"
    WTF_CSRF_ENABLED = False  # Allows form testing

# -*- coding: utf-8 -*-
"""Application configuration."""
import os, datetime
import simplekv.memory

class Config(object):
    """Base configuration."""

    #SECRET_KEY = os.environ.get('MYFLASKAPP_SECRET', 'secret-key')  # TODO: Change me
    SECRET_KEY = '<KEY>' #csrf
    EMAIL_KEY = '<KEY>' # email verification url server sign
    EMAIL_SALT = '5yWHy0BJhZHsmztTgEWBN85e1pfcST0NeRqHgZnYbpReX65C8zHEuf7Ll5JDcRMK'# email verification url server salt
    API_SALT = 'rZaz0baIqkRcGgHJkF3wlrIr3MSXlfuxZn0FFyGJcDIwehSaaMxk7IgoiHeG3XLy'  # api server signature for signing tokens.
    APP_DIR = os.path.abspath(os.path.dirname(__file__))  # This directory
    PROJECT_ROOT = os.path.abspath(os.path.join(APP_DIR, os.pardir))
    BCRYPT_LOG_ROUNDS = 13
    ASSETS_DEBUG = False
    DEBUG_TB_ENABLED = False  # Disable Debug toolbar
    DEBUG_TB_INTERCEPT_REDIRECTS = False
    CACHE_TYPE = 'simple'  # Can be "memcached", "redis", etc.
    SQLALCHEMY_TRACK_MODIFICATIONS = False
    MAPBOX_ACCESS_TOKEN = '<KEY>'

    #jwt
    JWT_BLACKLIST_ENABLED = True
    JWT_BLACKLIST_STORE = simplekv.memory.DictStore()
    JWT_BLACKLIST_TOKEN_CHECKS = 'refresh'
    JWT_ACCESS_TOKEN_EXPIRES = datetime.timedelta(minutes=30)

    # mail settings
    MAIL_SERVER = 'smtp.gmail.com'
    MAIL_PORT = 587
    MAIL_USE_TLS = True
    MAIL_USE_SSL = False
    # gmail authentication
    MAIL_USERNAME = ''
    MAIL_PASSWORD = ''
    # mail accounts
    MAIL_DEFAULT_SENDER = ''

    # async celery -enable fernet encryption
    CELERY_BROKER_URL = 'amqp://guest:@127.0.0.1:5672//'
    CELERY_RESULT_BACKEND = 'amqp://guest:@127.0.0.1:5672//'

    #mobile
    TWILIO_ACCOUNT_SID = 'AC<KEY>'
    TWILIO_AUTH_TOKEN = '<PASSWORD>'
    TWILIO_NUMBER = '+12048099756'

    #compression
    COMPRESS_MIMETYPES = 'application/json'
    COMPRESS_LEVEL = 6
    COMPRESS_MIN_SIZE = 500

class ProdConfig(Config):
    """Production configuration."""

    ENV = 'prod'
    DEBUG = False
    SQLALCHEMY_DATABASE_URI = 'postgres://rsabrgeoknimft:XEkvI6vNbQp7D20xrK-Cklr8xo@ec2-204-236-228-77.compute-1.<EMAIL>.com:5432/dck08qjrmev1uv'  # TODO: Change me
    DEBUG_TB_ENABLED = False  # Disable Debug toolbar
    SESSION_COOKIE_SECURE = True
    SESSION_COOKIE_HTTPONLY = True
    WTF_CSRF_ENABLED = True
    BCRYPT_LOG_ROUNDS = 13

class DevConfig(Config):
    """Development configuration."""

    ENV = 'dev'
    DEBUG = True
    DB_NAME = 'dev.db'
    # Put the db file in project root
    DB_PATH = os.path.join(Config.PROJECT_ROOT, DB_NAME)
    SQLALCHEMY_DATABASE_URI = 'sqlite:///{0}'.format(DB_PATH) # memorydb 'sqlite://'
    DEBUG_TB_ENABLED = True
    CACHE_TYPE = 'simple'  # Can be "simple", "memcached", "redis", etc.
    WTF_CSRF_ENABLED = False
    TRAP_HTTP_EXCEPTIONS = True


class TestConfig(Config):
    """Test configuration."""

    TESTING = True
    DEBUG = True
    SQLALCHEMY_DATABASE_URI = 'sqlite://'
    BCRYPT_LOG_ROUNDS = 4  # For faster tests; needs at least 4 to avoid "ValueError: Invalid rounds"
    WTF_CSRF_ENABLED = False  # Allows form testing
# -*- coding: utf-8 -*- Application configuration. Base configuration. #SECRET_KEY = os.environ.get('MYFLASKAPP_SECRET', 'secret-key')  # TODO: Change me #csrf # email verification url server sign # api server signature for signing tokens. # This directory # Disable Debug toolbar # Can be "memcached", "redis", etc. #jwt # mail settings # gmail authentication # mail accounts # async celery -enable fernet encryption #mobile #compression Production configuration. # TODO: Change me # Disable Debug toolbar Development configuration. # Put the db file in project root # memorydb 'sqlite://' # Can be "simple", "memcached", "redis", etc. Test configuration. # For faster tests; needs at least 4 to avoid "ValueError: Invalid rounds" # Allows form testing