Getting Started
Prerequisites
You need:
- Python 3.12+
- a Python project with importable source files
Installation
Run
From a project root:
Privata exits with status 0 when no privacy issues are found.
It exits with status 1 when it finds public symbols that can be made private or private module imports that cross package boundaries.
Pre-Commit
Add Privata to another repository's .pre-commit-config.yaml:
Use id: privata-manual instead if you only want to run Privata on demand:
Source Roots
Privata uses tach.toml source_roots when present:
Without Tach source roots, Privata prefers a src/ directory:
If src/ is absent, Privata scans the project root and ignores tests, virtualenvs, build output, docs output, and hidden tooling directories.
Tests can live anywhere.
Imports from tests do not count when deciding whether a symbol should stay public.