tach
A Python tool to visualize + enforce dependencies, using modular architecture π Open source π Installable via pip π§ Able to be adopted incrementally - β‘ Imp
What is tach?
A Python tool to visualize + enforce dependencies, using modular architecture π Open source π Installable via pip π§ Able to be adopted incrementally - β‘ Implemented with no runtime impact βΎοΈ Interoperable with your existing systems π¦ Written in rust
Overview of tach
What it is
Tach is a Python tool to enforce dependencies and interfaces, written in Rust. It is inspired by the modular monolith architecture. Tach can enforce that imports only come from declared dependencies, cross-module calls use the public interface, and there are no cycles in the dependency graph. It is open source, installable via pip, able to be adopted incrementally, implemented with no runtime impact, and interoperable with existing systems.
Key features
- Enforces imports only from declared dependencies - Enforces cross-module calls to use the public interface - Enforces no cycles in the dependency graph - Supports public interfaces for modules - Supports deprecating individual dependencies - Supports layered architecture - Supports incremental adoption, generating JSON dependency maps, monorepos and namespace packages, domain ownership, inline 'ignore' comments, and pre-commit hooks
Use cases
Tach can be used to enforce modular architecture in Python projects, visualize dependency graphs, and integrate with CI/CD, pre-commit hooks, and VS Code. It is suitable for monorepos, namespace packages, and projects that need to maintain clear module boundaries.
Getting started
Install Tach via pip: bash pip install tach Then run the setup command: bash tach init To enforce boundaries, run: bash tach check To visualize the dependency graph: bash tach show [--web]
License and pricing
The license is MIT. The pricing type is open source.
Based on the project's public README and repository metadata.