Privata
Keep Python module interfaces intentional
Privata scans Python source roots and reports public symbols that are only used inside their own module. It also reports private module imports that cross package boundaries.
PyPI package ยท GitHub repository
Quick Start
Continue with Getting Started, or see the usage guide for the full checker behavior.
Features
- Finds public module-level functions, classes, variables, and type aliases that can be made private.
- Ignores test imports when deciding whether a symbol is public.
- Detects private modules imported from outside their owning package subtree.
- Detects private top-level symbols imported by another production module.
- Validates literal
__all__declarations for stale and missing exports. - Honors package
__init__.pyre-exports and literal__all__declarations. - Honors
pyproject.tomlconsole entry points, Uvicorn shell entry points, and Tach interfaces. - Uses Tach
source_roots,src/, or the project root depending on the repository layout. - Uses only the Python standard library at runtime.