A reusable Python library.
This project uses the shared py-lib project structure: source-layout packaging, a small public package boundary, private implementation folders, layered tests, package docs, runnable public API examples, local workbench probes, and reusable project tooling.
src/source-layout packaging.- A stable top-level public package entrypoint.
_apideclarations over private_internalimplementation.- A reusable config lifecycle with public re-exports and private snapshot state.
- Structured logging plus safe error/value previews from
py-lib-runtime. - Unit, integration, property-based, and e2e test folders.
- Reusable development and test tooling through
py-lib-tooling. - Package-specific tests under
tests/sandbox_python_lib/. - Runnable public API examples under
examples/sandbox_python_lib/. - Manual probes under
workbench/sandbox_python_lib/. - Package docs under
docs/sandbox_python_lib/. - Shared tooling metadata in
[tool.py_lib_starter]. - Import-linter and smoke-check wiring.
The package starts with the common public boundary used across the py libraries: version metadata, a package base error, config install/read helpers, and a validated config snapshot type.
from sandbox_python_lib import SampleLibConfig, get_config, install_config
config = install_config(SampleLibConfig())
assert get_config() is configAdd product-specific facades, DTOs, defaults, and vocabulary only when the library has real behavior to ship.
uv sync --group dev
uv run pytestAfter the first render, review project metadata, repository URLs, environment prefixes, and the first real public behavior slice before treating the package as ready for product work.
Review these project-specific values first:
- Distribution name:
sandbox-python-lib - Import package:
sandbox_python_lib - Public API objects in
src/sandbox_python_lib/__init__.py - Package docs under
docs/sandbox_python_lib/ - Package tests under
tests/sandbox_python_lib/ - Runnable examples under
examples/sandbox_python_lib/ - Workbench probes under
workbench/sandbox_python_lib/ - Project URLs in
pyproject.toml - Environment prefix:
SANDBOX_PYTHON_LIB - Optional
[tool.py_lib_runtime.logging]policy if local runs need non-default logging levels or quiet third-party modules
Start with docs/sandbox_python_lib/README.md for architecture, usage, dependency, and verification notes.