pgn2json.config package¶
Submodules¶
pgn2json.config.constants module¶
constants.py: Constants for the application.
- class pgn2json.config.constants.Constants¶
Bases:
objectConstants for the application.
Notes
This class contains constants used throughout the application. By storing constants in a single location, it is easier to manage and update them. Constants should be defined as class attributes and should be named in uppercase with underscores separating words. Constants should use type hints to indicate to the user what type of data they should store.
- DEFAULT_JSON_SAVE_FOLDER: Path = PosixPath('.obsidian/plugins/chess-study/storage')¶
- DEFAULT_LOG_SAVE_PATH: Path = PosixPath('pgn2json_log.txt')¶
- FORBIDDEN_CODE: int = 403¶
- LOGGING_CONSOLE_FORMAT: str = '%(message)s'¶
- LOGGING_DATE_FORMAT: str = '[%X]'¶
- LOGGING_LEVEL_CONSOLE_DEFAULT: Literal['CRITICAL', 'ERROR', 'WARNING', 'INFO', 'DEBUG'] = 'INFO'¶
- LOGGING_LEVEL_LOGFILE_DEFAULT: Literal['CRITICAL', 'ERROR', 'WARNING', 'INFO', 'DEBUG'] = 'DEBUG'¶
- LOGGING_LOGFILE_FORMAT: str = '%(asctime)s - %(name)s - %(levelname)s - %(message)s'¶
- LOGGING_TIMESTAMP_FORMAT: str = '%Y-%m-%d_%H-%M-%S'¶
- LOGGING_TRACEBACKS: bool = True¶
- POSITION_FLAGS: dict[str, str] = {'capture': 'c', 'en_passant': 'e', 'kingside_castling': 'k', 'normal': 'n', 'pawn_push_double': 'b', 'promotion': 'p', 'queenside_castling': 'q'}¶
- POSSIBLE_LOGGING_LEVELS¶
alias of
Literal[‘CRITICAL’, ‘ERROR’, ‘WARNING’, ‘INFO’, ‘DEBUG’]
- SUCCESS_CODE: int = 200¶
- SUCCESS_TEXT: str = 'OK'¶
- UUID_LENGTH: int = 21¶
Module contents¶
Config package for the project.