class DefaultApiConfig: app: str host: str port: int log_level: str reload: bool @classmethod def as_dict(cls): return { "app": cls.app, "host": cls.host, "port": int(cls.port), "log_level": cls.log_level, "reload": bool(cls.reload), } class ApiStatic: PLACEHOLDER = "https://s.tmimgcdn.com/scr/800x500/276800/building-home-nature-logo-vector-template-3_276851-original.jpg" FORGOT_LINK = "https://www.evyos.com.tr/password/create?tokenUrl=" BLACKLIST_LINK = "https://www.evyos.com.tr/support/unknown-login-notice/" APP_DIR = "/home/berkay/git-evyos/api-managment-backend/" @classmethod def forgot_link(cls, forgot_key): return cls.FORGOT_LINK + forgot_key @classmethod def blacklist_login(cls, record_id): return cls.BLACKLIST_LINK + record_id class ApiConfig(DefaultApiConfig): # Api configuration APP_NAME = "evyos-validation-api-gateway" TITLE = "WAG API Validation Api Gateway" DESCRIPTION = ( "This api is serves as web validation api gateway only to evyos web services." ) APP_URL = "https://www.validation.eys.gen.tr" # App configuration app = "app:app" host = "0.0.0.0" port = 8888 log_level = "info" reload = True class MainConfig: # Main configuration DATETIME_FORMAT = "YYYY-MM-DD HH:mm:ss Z" DATETIME_FORMAT_JS = "YYYY-MM-DD HH:mm:ss +0" # Timezone Configuration DEFAULT_TIMEZONE = "GMT+3" # Default timezone for the application SYSTEM_TIMEZONE = "GMT+0" # System timezone (used for internal operations) SUPPORTED_TIMEZONES = ["GMT+0", "GMT+3"] # List of supported timezones class ValidationsConfig: SUPPORTED_VALIDATIONS = ["header", "validation", "all"] DEFAULT_VALIDATION = "all"