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.

Add this badge to your README

Featured on YunoDB Badge styles & help

Maintain this project? Show that it is featured on YunoDB.

Markdown[![Featured on YunoDB](https://yunodb.com/badge/tach-orgtach.svg)](https://yunodb.com/tools/tach-orgtach?utm_source=github&utm_medium=badge)
HTML<a href="https://yunodb.com/tools/tach-orgtach?utm_source=github&utm_medium=badge"><img src="https://yunodb.com/badge/tach-orgtach.svg" alt="Featured on YunoDB" height="20"></a>