Create config.py
Browse files
config.py
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import os
|
| 2 |
+
|
| 3 |
+
class Config:
|
| 4 |
+
SECRET_KEY = os.getenv('SECRET_KEY', 'your-secret-key')
|
| 5 |
+
SQLALCHEMY_DATABASE_URI = os.getenv('DATABASE_URL', 'sqlite:///app.db')
|
| 6 |
+
SQLALCHEMY_TRACK_MODIFICATIONS = False
|
| 7 |
+
CELERY_BROKER_URL = os.getenv('CELERY_BROKER_URL', 'redis://localhost:6379/0')
|
| 8 |
+
CELERY_RESULT_BACKEND = os.getenv('CELERY_RESULT_BACKEND', 'redis://localhost:6379/0')
|
| 9 |
+
OPENAI_API_KEY = os.getenv('OPENAI_API_KEY', 'your-openai-api-key')
|
| 10 |
+
|
| 11 |
+
class DevelopmentConfig(Config):
|
| 12 |
+
DEBUG = True
|
| 13 |
+
|
| 14 |
+
class ProductionConfig(Config):
|
| 15 |
+
DEBUG = False
|
| 16 |
+
|
| 17 |
+
class TestingConfig(Config):
|
| 18 |
+
TESTING = True
|
| 19 |
+
SQLALCHEMY_DATABASE_URI = 'sqlite:///:memory:'
|