Spaces:
Runtime error
Runtime error
Upload 2 files
Browse files- app/__init__.py +1 -0
- app/config.py +25 -0
app/__init__.py
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
__version__ = "0.0.1"
|
app/config.py
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import sys
|
| 2 |
+
from typing import List
|
| 3 |
+
|
| 4 |
+
from pydantic import AnyHttpUrl, BaseSettings
|
| 5 |
+
|
| 6 |
+
class Settings(BaseSettings):
|
| 7 |
+
API_V1_STR: str = "/api/v1"
|
| 8 |
+
|
| 9 |
+
# Meta
|
| 10 |
+
|
| 11 |
+
# BACKEND_CORS_ORIGINS is a comma-separated list of origins
|
| 12 |
+
# e.g: http://localhost,http://localhost:4200,http://localhost:3000
|
| 13 |
+
BACKEND_CORS_ORIGINS: List[AnyHttpUrl] = [
|
| 14 |
+
"http://localhost:3000", # type: ignore
|
| 15 |
+
"http://localhost:8000", # type: ignore
|
| 16 |
+
"https://localhost:3000", # type: ignore
|
| 17 |
+
"https://localhost:8000", # type: ignore
|
| 18 |
+
]
|
| 19 |
+
|
| 20 |
+
PROJECT_NAME: str = "Recognition API"
|
| 21 |
+
|
| 22 |
+
class Config:
|
| 23 |
+
case_sensitive = True
|
| 24 |
+
|
| 25 |
+
settings = Settings()
|