A Python console application designed to streamline the management of library book loans and inventory. It provides an efficient, memory-based system to handle book records, student interactions, and loan lifecycles.
- Python >= 3.13.9
Install uv:
# Windows
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
# macOS / Linux
curl -LsSf https://astral.sh/uv/install.sh | shFrom the repo root:
uv syncVS Code: open the Command Palette (
Ctrl+Shift+P), run Python: Select Interpreter, and choose the.venvcreated byuv. Reload your terminal afterwards.
From the repo root:
uv run python -m frontend.mainUse Ctrl+C to exit the application at any time.
The project follows a clean structure to separate the business rules from the user interface:
backend/domain/: Contains the core data models (Book,Student,Loan) and Enums.backend/services/: Contains the business logic for managing books and loans.backend/repository/: Handles data storage.frontend/: Contains the CLI menus and user interaction logic.data/: Directory where persistent files are stored.
Contributions are welcome. Suggested workflow:
- Fork the repository.
- Create a feature branch:
feat/my-change. - Make your changes, ensuring they follow the existing code style.
- Include appropriate documentation or tests.
- Commit, push, and open a pull request describing the change and the reason for it.
This project uses pre-commit to enforce code quality automatically before each commit. Run the following once from the repo root to set it up:
pip install pre-commit
pre-commit installAfter that, checks will run automatically on every git commit. To run them manually across all files:
pre-commit run --all-filesThis project is available under the MIT License.