Lib Minimal (library starter)¶
A lean Python library skeleton with packaging, testing, CI, and editor settings ready to go.
Expected layout (after scaffold)¶
project/
src/<project_name>/
__init__.py
main.py
tests/
unit/test_main.py
integration/
performance/
assets/
data/
docs/
container/
scripts/
.github/workflows/tests.yaml
.vscode/
.env
pyproject.toml
README.md
templates/python-common.
Folder Descriptions¶
| Folder | Purpose | Expected Content |
|---|---|---|
src/<project_name>/ |
Library source code | Python modules, classes, functions — your library's public API |
tests/unit/ |
Unit tests | Fast, isolated tests for individual functions and classes |
tests/integration/ |
Integration tests | Tests with external dependencies (databases, APIs, file systems) |
tests/performance/ |
Performance tests | Benchmarks, load tests, memory profiling |
assets/ |
Static resources | Images, icons, fonts, static files bundled with the library |
data/ |
Data storage | SQLite databases, CSV files, XLSX files, JSON data, fixtures, seed data |
docs/ |
Documentation | API reference, tutorials, user guides (starter index.md created) |
container/ |
Container configuration | Dockerfile, docker-compose.yaml for containerized environments |
scripts/ |
Utility scripts | Build scripts, automation, CLI helpers |
.github/workflows/ |
CI/CD pipelines | GitHub Actions for tests, linting, publishing to PyPI |
.vscode/ |
Editor settings | VS Code workspace settings, recommended extensions, debug configs |
Starting points¶
Sample entrypoint: templates/lib-minimal/main.py
The generatedtests/unit/test_main.py asserts that this output appears.
Typical workflow¶
- Add library functions/classes under
src/<project_name>/. - Add or expand tests in
tests/unit/(and integration/performance as needed). - Run tests with Poetry:
poetry run pytest. - Keep the docs (
docs/) in sync with assets APIs; you can host them with mkdocs like the BlueprintX docs.