Skip to main content

Tach

downloads version license python ci basedpyright - checked ruff

Tach is a Python tool to enforce dependencies and interfaces, written in Rust.

Tach is inspired by the modular monolith architecture.

Docs

gauge-logo

https://github.com/user-attachments/assets/11eec4a1-f80a-4f13-9ff3-91a9760133b6

Tach can enforce:

Tach is:

  • 🌎 Open source
  • 🐍 Installable via pip
  • 🔧 Able to be adopted incrementally
  • ⚡ Implemented with no runtime impact
  • ♾️ Interoperable with your existing systems

Getting Started

Installation

pip install tach

Setup

Tach will guide you through initial project setup.

Run:

 tach init

After an introductory message, you will see a file tree interface allowing you to interactively configure your project.

Use the arrow keys to navigate, and mark each module boundary with 'Enter'. You can mark all of your top-level Python packages, or just a few that you want to track.

FAQ: What is a module?

If your Python code lives below your project root, or if you are working in a monorepo with multiple Python packages, mark your Python source roots using the 's' key.

Enforcement

Tach comes with a cli command to enforce the boundaries that you just set up! From the root of your Python project, run:

tach check

You will see:

✅ All modules validated!

You can validate that Tach is working by:

  1. Removing an item from the depends_on key in tach.toml, or marking it as deprecated
  2. By adding an import between modules that didn't previously import from each other.

Give both a try and run tach check again. This will generate an error:

❌ tach/check.py[L8]: Cannot use 'tach.filesystem'. Module 'tach' cannot depend on 'tach.filesystem'.

Each error indicates an import which violates your dependencies. If your terminal supports hyperlinks, click on the file path to go directly to the error.

When an error is detected, tach check will exit with a non-zero code. It can be easily integrated with CI/CD, Pre-commit hooks, and VS Code, and more!

Extras

Visualize your dependency graph.

tach show [--web]

Tach will generate a graph of your dependencies. Here's what this looks like for Tach:

tach show

Note that this graph is generated remotely with the contents of your tach.toml when running tach show --web.

If you would like to use the GraphViz DOT format locally, simply running tach show will generate tach_module_graph.dot in your working directory.

You can view the dependencies and usages for a given path:

tach report my_package/
# OR
tach report my_module.py

e.g.:

> tach report python/tach/filesystem
[Dependencies of 'python/tach/filesystem']
python/tach/filesystem/install.py[L6]: Import 'tach.hooks.build_pre_commit_hook_content'
python/tach/filesystem/project.py[L5]: Import 'tach.constants.CONFIG_FILE_NAME'
...
-------------------------------
[Usages of 'python/tach/filesystem']
python/tach/cache/access.py[L8]: Import 'tach.filesystem.find_project_config_root'
python/tach/cache/setup.py[L7]: Import 'tach.filesystem.find_project_config_root'
...

Tach also supports:

More info in the docs. If you have any feedback, we'd love to talk!

If you have any questions or run into any issues, let us know by submitting a Github Issue!


Contributors

Metadata

Release files for tach 0.35.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tach 0.35.3
File Size Uploaded
tach-0.35.3.tar.gz 734.0 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for tach 0.35.3
File
tach-0.35.3-cp37-abi3-win_arm64.whl CPython 3.7 abi3 Windows ARM64 Details
tach-0.35.3-cp37-abi3-win_amd64.whl CPython 3.7 abi3 Windows x86-64 Details
tach-0.35.3-cp37-abi3-win32.whl CPython 3.7 abi3 Windows x86-32 Details
tach-0.35.3-cp37-abi3-musllinux_1_2_x86_64.whl CPython 3.7 abi3 Linux musl 1.2+ x86-64 Details
tach-0.35.3-cp37-abi3-musllinux_1_2_ppc64le.whl CPython 3.7 abi3 Linux musl 1.2+ PowerPC 64-le Details
tach-0.35.3-cp37-abi3-musllinux_1_2_i686.whl CPython 3.7 abi3 Linux musl 1.2+ x86-32 Details
tach-0.35.3-cp37-abi3-musllinux_1_2_armv7l.whl CPython 3.7 abi3 Linux musl 1.2+ ARMv7l Details
tach-0.35.3-cp37-abi3-musllinux_1_2_aarch64.whl CPython 3.7 abi3 Linux musl 1.2+ ARM64 Details
tach-0.35.3-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.7 abi3 Linux glibc 2.17+ x86-64 Details
tach-0.35.3-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl CPython 3.7 abi3 Linux glibc 2.17+ IBM System/390x Details
tach-0.35.3-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl CPython 3.7 abi3 Linux glibc 2.17+ PowerPC 64-le Details
tach-0.35.3-cp37-abi3-manylinux_2_17_i686.manylinux2014_i686.whl CPython 3.7 abi3 Linux glibc 2.17+ x86-32 Details
tach-0.35.3-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl CPython 3.7 abi3 Linux glibc 2.17+ ARMv7l Details
tach-0.35.3-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.7 abi3 Linux glibc 2.17+ ARM64 Details
tach-0.35.3-cp37-abi3-macosx_11_0_arm64.whl CPython 3.7 abi3 macOS 11.0+ ARM64 Details
tach-0.35.3-cp37-abi3-macosx_10_12_x86_64.whl CPython 3.7 abi3 macOS 10.12+ x86-64 Details

Total release size: 70.4 MB

Release files / tach-0.35.3.tar.gz

Download URL tach-0.35.3.tar.gz
Size 734.0 kB
Tags Source
SHA-256 checksum
How to use checksums
251a9cbbadd923f54668ca5f1adc4d5239ccab87fd630c5880efced235175661
BLAKE2b-256 checksum
How to use checksums
6c918c7ada391a5bc34498893e430f3f8e34082450017892135eccde233086c1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.7.1

Release files / tach-0.35.3-cp37-abi3-win_arm64.whl

Download URL tach-0.35.3-cp37-abi3-win_arm64.whl
Size 3.5 MB
Tags CPython 3.7 Windows ARM64 abi3
SHA-256 checksum
How to use checksums
2e5341791e59a88d5a915d90e734eae8f6564a276ff47d672a2e44ab6354ae28
BLAKE2b-256 checksum
How to use checksums
6ff98e16c363185bc9dc67e267f702f89a6b57f636b3e9ac1c6ce662ea870a16
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.7.1

Release files / tach-0.35.3-cp37-abi3-win_amd64.whl

Download URL tach-0.35.3-cp37-abi3-win_amd64.whl
Size 3.7 MB
Tags CPython 3.7 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
1be24413f34fdbca85a137bc7f7904ae92f928b30aa9137e69b52ad0f7fb8237
BLAKE2b-256 checksum
How to use checksums
9d457eee8d2f77060b0ee7b9252ccc351e610556df3bf46001d8684b22220f7b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.7.1

Release files / tach-0.35.3-cp37-abi3-win32.whl

Download URL tach-0.35.3-cp37-abi3-win32.whl
Size 3.5 MB
Tags CPython 3.7 Windows x86-32 abi3
SHA-256 checksum
How to use checksums
1264e7907a0781c4cc1d064f38948dcbc35c52905e35a1e17322e9e09c4f31e0
BLAKE2b-256 checksum
How to use checksums
07143f7f82ace15f349a9236397b298430ae9a5c7801f5272ea820f57c039978
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.7.1

Release files / tach-0.35.3-cp37-abi3-musllinux_1_2_x86_64.whl

Download URL tach-0.35.3-cp37-abi3-musllinux_1_2_x86_64.whl
Size 4.6 MB
Tags CPython 3.7 Linux musl 1.2+ x86-64 abi3
SHA-256 checksum
How to use checksums
a618bc49c3d64f823652b99e83f1a57b0ef31eab46086d73535d3a654b95a9d3
BLAKE2b-256 checksum
How to use checksums
d570cd9bec6c25f6c9227ee3396d649584823d567064b7504a940f2d17384ae9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.7.1

Release files / tach-0.35.3-cp37-abi3-musllinux_1_2_ppc64le.whl

Download URL tach-0.35.3-cp37-abi3-musllinux_1_2_ppc64le.whl
Size 5.4 MB
Tags CPython 3.7 Linux musl 1.2+ PowerPC 64-le abi3
SHA-256 checksum
How to use checksums
cc6e8b6144bba298320db388acf2beeaf4bf75cf2d92b3924bb809b96fb7b34e
BLAKE2b-256 checksum
How to use checksums
d0bb7cff2a20b5986f020e1c5d3572293a52dbbfd0ac02239d37ba1bb788b07d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.7.1

Release files / tach-0.35.3-cp37-abi3-musllinux_1_2_i686.whl

Download URL tach-0.35.3-cp37-abi3-musllinux_1_2_i686.whl
Size 4.6 MB
Tags CPython 3.7 Linux musl 1.2+ x86-32 abi3
SHA-256 checksum
How to use checksums
115fa499ea364500c131060240e1a3a15c1434da184c16ac62923a7ba854cad5
BLAKE2b-256 checksum
How to use checksums
b1c2dd481eb7145fbe4835a06b555f99ec4e54669eef553dc3ffc49192a1adc8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.7.1

Release files / tach-0.35.3-cp37-abi3-musllinux_1_2_armv7l.whl

Download URL tach-0.35.3-cp37-abi3-musllinux_1_2_armv7l.whl
Size 4.5 MB
Tags CPython 3.7 Linux musl 1.2+ ARMv7l abi3
SHA-256 checksum
How to use checksums
2e87d929c09c0bafca4dfec28b32e2878eb4e38fbcb07f3a966f0d49c1b851e8
BLAKE2b-256 checksum
How to use checksums
a9ebcbef415adb32528ded7930ba0889a9f2fc410878b7633aeab4e916cc8290
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.7.1

Release files / tach-0.35.3-cp37-abi3-musllinux_1_2_aarch64.whl

Download URL tach-0.35.3-cp37-abi3-musllinux_1_2_aarch64.whl
Size 4.5 MB
Tags CPython 3.7 Linux musl 1.2+ ARM64 abi3
SHA-256 checksum
How to use checksums
44dca3954f75dd7818f18f0e757f27355d9c570d194fe622f3b978c7e2a66590
BLAKE2b-256 checksum
How to use checksums
3adb199fa1f44cfe2dfec378727d10ad59042a8492369a4be57be5b8da61f769
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.7.1

Release files / tach-0.35.3-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL tach-0.35.3-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 4.6 MB
Tags CPython 3.7 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
a0f73de7012495877497b781c571208ed6352cf579f400c83165ce4558b9b23e
BLAKE2b-256 checksum
How to use checksums
e052351847518d94cc736d937b26540c46720ff25ac411c64c3ac80f5e4eb1ce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.7.1

Release files / tach-0.35.3-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl

Download URL tach-0.35.3-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Size 4.3 MB
Tags CPython 3.7 Linux glibc 2.17+ IBM System/390x abi3
SHA-256 checksum
How to use checksums
aeef128bb5f2893e517f9868c840d8553a097add280d4823535c68bbe34b769a
BLAKE2b-256 checksum
How to use checksums
25eb49b698a1ddc3bc64d73ce4560a4b487abfded7880e092f319030ec639a8e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.7.1

Release files / tach-0.35.3-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl

Download URL tach-0.35.3-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Size 5.2 MB
Tags CPython 3.7 Linux glibc 2.17+ PowerPC 64-le abi3
SHA-256 checksum
How to use checksums
924216a43f0ce4d69259eeb5647f595a07f2c7634bd3d76062cc6075588545b4
BLAKE2b-256 checksum
How to use checksums
bf6fe9d2f2b4202dfd12c6361bdb517288fc99accd1646ce6fb354f4215be2f4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.7.1

Release files / tach-0.35.3-cp37-abi3-manylinux_2_17_i686.manylinux2014_i686.whl

Download URL tach-0.35.3-cp37-abi3-manylinux_2_17_i686.manylinux2014_i686.whl
Size 4.6 MB
Tags CPython 3.7 Linux glibc 2.17+ x86-32 abi3
SHA-256 checksum
How to use checksums
e98fa9094a15ee204ca00202f6a0559cfe37183a9042cb349c41cadd5cc12d56
BLAKE2b-256 checksum
How to use checksums
c364dc5daaa787500c5f559dc863af2de8fa6321b8a90ff33b83ed98fbf3a145
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.7.1

Release files / tach-0.35.3-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl

Download URL tach-0.35.3-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Size 4.2 MB
Tags CPython 3.7 Linux glibc 2.17+ ARMv7l abi3
SHA-256 checksum
How to use checksums
e07e0d3a3caf98095d31f70dffa83021bc70c0281dfc5d923690ff5cc175ed42
BLAKE2b-256 checksum
How to use checksums
b65bba96a8190814801fd28ace13475a5fa4812ae400b0daf3ff3ee7cb3a05cb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.7.1

Release files / tach-0.35.3-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL tach-0.35.3-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 4.3 MB
Tags CPython 3.7 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
76967be260f90298b7f5908263104f506f5759774d094355f66b3996f47095df
BLAKE2b-256 checksum
How to use checksums
c5fca6e52b44f6418e1d39874c957a087f8e64bbd771f9ef2b657e6f73e44515
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.7.1

Release files / tach-0.35.3-cp37-abi3-macosx_11_0_arm64.whl

Download URL tach-0.35.3-cp37-abi3-macosx_11_0_arm64.whl
Size 4.0 MB
Tags CPython 3.7 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
612ae59990ae7ef69ac09c715aa16894ab15d35faa1d555606f2ab866925b06f
BLAKE2b-256 checksum
How to use checksums
9ceca28f24edb88eb3cbaf4d0b66b0e3784fd4d71ee4a4ef6d131e1aaa66dc4e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.7.1

Release files / tach-0.35.3-cp37-abi3-macosx_10_12_x86_64.whl

Download URL tach-0.35.3-cp37-abi3-macosx_10_12_x86_64.whl
Size 4.1 MB
Tags CPython 3.7 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
d37fa7889c7d0f57be9d7be7173c40f9934e9a4178c5610d061e3da0e67f3619
BLAKE2b-256 checksum
How to use checksums
1e82a2fdadce373a5f196abb0a1e9f4a556292da253b17d2e2874bd9401cd952
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.7.1

Release history Release notifications | RSS feed

This release

0.35.3 This release

17 release files

0.9.2

81 release files

0.9.0

81 release files

0.8.3

81 release files

0.5.3

67 release files

0.3.0

67 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.11

2 release files

0.1.10

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.4

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page