Files
redmine_tracker/config.py
2025-05-14 18:01:57 +03:00

40 lines
786 B
Python

from pydantic_settings import BaseSettings
class Config(BaseSettings):
CLOCKIFY_TOKEN: str
REDMINE_TOKEN: str
CLOCKIFY_USER_ID: str
CLOCKIFY_WORKSPACE_ID: str
DATETIME_FORMAT: str = "%Y-%m-%dT%H:%M:%SZ"
class RedmineConfig(BaseSettings):
BASE_API_URL: str = "https://redmine.sbps.ru"
TIME_ENTRIES: str = "/time_entries.json"
class ClockifyConfig(BaseSettings):
@property
def base_url(self):
return "https://api.clockify.me/api/v1"
@property
def tags_url(self):
return "/workspaces/{workspace_id}/tags"
@property
def time_entries_url(self):
return "/workspaces/{workspace_id}/user/{user_id}/time-entries"
@property
def user_url(self):
return "/user"
config = Config()