Utils Module
Source: gitlab_overviewer.utils.__init__.py
Utility helpers for gitlab_overviewer.
Implements Specification: Configuration Settings Layer §2.7 and Specification: GitLab API Client §1, covering:
Logging utilities
Timestamp helpers
API reading helpers
Miscellaneous functions
Provides logging setup, timestamp utilities, API reading helpers, and miscellaneous functions.
gitlab_overviewer.utils.logging– Logging utilitiesgitlab_overviewer.utils.timestamp– Timestamp helpersgitlab_overviewer.utils.read_api– API reading helpersgitlab_overviewer.utils.render_utils– Rendering utilities
See also: Logger, get_timestamp(), read_api_response()
utils.timestamp
Source: gitlab_overviewer.utils.timestamp.py
Timestamp utilities for diagnostic outputs.
Implements Specification: Table Rendering & UI §2.2, covering:
ISO8601 timestamp formatting
Timezone handling (UTC)
This module provides functions for generating consistent, timezone-aware timestamps in ISO8601 format for use in diagnostic output filenames.
utils.read_api
Source: gitlab_overviewer.utils.read_api.py
API data reading utilities.
Implements Specification: GitLab API Client §1, covering:
Endpoint discovery and documentation
OpenAPI spec parsing
utils.logging
Source: gitlab_overviewer.utils.logging.py
Logging configuration utilities.
Implements Specification: Configuration Settings Layer §2.7, covering:
Log level configuration from environment
Colored output formatting
- class gitlab_overviewer.utils.logging._ColorFormatter(fmt=None, datefmt=None, style='%', validate=True, *, defaults=None)[source]
Bases:
FormatterSimple colored formatter for console output.
- format(record)[source]
Format the specified record as text.
The record’s attribute dictionary is used as the operand to a string formatting operation which yields the returned string. Before formatting the dictionary, a couple of preparatory steps are carried out. The message attribute of the record is computed using LogRecord.getMessage(). If the formatting string uses the time (as determined by a call to usesTime(), formatTime() is called to format the event time. If there is exception information, it is formatted using formatException() and appended to the message.
- Return type:
str