This commit is contained in:
50
backend/app/config.py
Normal file
50
backend/app/config.py
Normal file
@@ -0,0 +1,50 @@
|
||||
import os
|
||||
from pydantic_settings import BaseSettings
|
||||
|
||||
class Settings(BaseSettings):
|
||||
# Database
|
||||
DATABASE_URL: str = "postgresql://antiplagiator:antiplagiator_dev@localhost:5432/antiplagiator"
|
||||
|
||||
# Elasticsearch
|
||||
ELASTICSEARCH_HOST: str = "localhost"
|
||||
ELASTICSEARCH_PORT: int = 9200
|
||||
|
||||
# Redis
|
||||
REDIS_URL: str = "redis://localhost:6379/0"
|
||||
|
||||
# MinIO
|
||||
MINIO_ENDPOINT: str = "localhost:9000"
|
||||
MINIO_ACCESS_KEY: str = "minioadmin"
|
||||
MINIO_SECRET_KEY: str = "minioadmin"
|
||||
MINIO_BUCKET: str = "antiplagiator"
|
||||
MINIO_SECURE: bool = False
|
||||
|
||||
# JWT
|
||||
SECRET_KEY: str = "your-secret-key-change-in-prod"
|
||||
ALGORITHM: str = "HS256"
|
||||
ACCESS_TOKEN_EXPIRE_MINUTES: int = 30
|
||||
|
||||
# Celery
|
||||
CELERY_BROKER_URL: str = "redis://localhost:6379/0"
|
||||
CELERY_RESULT_BACKEND: str = "redis://localhost:6379/0"
|
||||
|
||||
# API
|
||||
API_TITLE: str = "Antiplagiator API"
|
||||
API_VERSION: str = "0.1.0"
|
||||
API_DESCRIPTION: str = "Text plagiarism detection system"
|
||||
|
||||
# Paths
|
||||
DATA_DIR: str = "./data"
|
||||
RAW_DATA_DIR: str = "./data/raw"
|
||||
PROCESSED_DATA_DIR: str = "./data/processed"
|
||||
INDEX_DIR: str = "./data/index"
|
||||
|
||||
# Analysis
|
||||
FINGERPRINT_THRESHOLD: float = 0.5
|
||||
SEMANTIC_THRESHOLD: float = 0.6
|
||||
TOP_K_RESULTS: int = 10
|
||||
|
||||
class Config:
|
||||
env_file = ".env"
|
||||
|
||||
settings = Settings()
|
||||
Reference in New Issue
Block a user