Core library shared across all FIT Project modules.
This repository provides common utilities, error handling, version management, and reusable components that power the FIT modular ecosystem.
- Provide a centralized core for shared logic used by all FIT modules.
- Offer utility functions and base classes to standardize module behavior.
- Simplify maintenance and ensure consistency across the FIT ecosystem.
- 🔧 Error and crash handling (
fit_common/core/error_handler.py,crash_handler.py) - 🧩 Debug utilities and logging (
debug.py) - 📦 Version management (
fit_common/core/utils/versions.py) - 🧠 Cross-module constants and configuration helpers
- 🧪 Tests and stubs for module integration
- Python 3.11
- Poetry (recommended for development)
poetry add git+https://github.com/fit-project/fit-common.git@main
# or
pip install git+https://github.com/fit-project/fit-common.git@maingit clone https://github.com/fit-project/fit-common.git
cd fit-common
poetry installfrom fit_common.core.utils.versions import (
get_local_version,
get_remote_tag_version,
has_new_release_version
)
print("Local version:", get_local_version())
print("Latest remote:", get_remote_tag_version("fit-project/fit-common"))from fit_common.core.error_handler import handle_error
try:
risky_operation()
except Exception as e:
handle_error(e)from fit_common.core.crash_handler import register_crash_handler
register_crash_handler()
# The program will now log unhandled exceptions globally.- Fork this repository.
- Create a new branch (
git checkout -b feat/my-feature). - Commit your changes using Conventional Commits.
- Submit a Pull Request describing your modification.