This commit is contained in:
2025-05-14 18:01:57 +03:00
commit 0294c3d540
7 changed files with 300 additions and 0 deletions

39
config.py Normal file
View File

@@ -0,0 +1,39 @@
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()