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.2

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.2
File Size Uploaded
tach-0.35.2.tar.gz 733.5 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for tach 0.35.2
File
tach-0.35.2-cp37-abi3-win_arm64.whl CPython 3.7 abi3 Windows ARM64 Details
tach-0.35.2-cp37-abi3-win_amd64.whl CPython 3.7 abi3 Windows x86-64 Details
tach-0.35.2-cp37-abi3-win32.whl CPython 3.7 abi3 Windows x86-32 Details
tach-0.35.2-cp37-abi3-musllinux_1_2_x86_64.whl CPython 3.7 abi3 Linux musl 1.2+ x86-64 Details
tach-0.35.2-cp37-abi3-musllinux_1_2_ppc64le.whl CPython 3.7 abi3 Linux musl 1.2+ PowerPC 64-le Details
tach-0.35.2-cp37-abi3-musllinux_1_2_i686.whl CPython 3.7 abi3 Linux musl 1.2+ x86-32 Details
tach-0.35.2-cp37-abi3-musllinux_1_2_armv7l.whl CPython 3.7 abi3 Linux musl 1.2+ ARMv7l Details
tach-0.35.2-cp37-abi3-musllinux_1_2_aarch64.whl CPython 3.7 abi3 Linux musl 1.2+ ARM64 Details
tach-0.35.2-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.2-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl CPython 3.7 abi3 Linux glibc 2.17+ IBM System/390x Details
tach-0.35.2-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl CPython 3.7 abi3 Linux glibc 2.17+ PowerPC 64-le Details
tach-0.35.2-cp37-abi3-manylinux_2_17_i686.manylinux2014_i686.whl CPython 3.7 abi3 Linux glibc 2.17+ x86-32 Details
tach-0.35.2-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl CPython 3.7 abi3 Linux glibc 2.17+ ARMv7l Details
tach-0.35.2-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.7 abi3 Linux glibc 2.17+ ARM64 Details
tach-0.35.2-cp37-abi3-macosx_11_0_arm64.whl CPython 3.7 abi3 macOS 11.0+ ARM64 Details
tach-0.35.2-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.2.tar.gz

Download URL tach-0.35.2.tar.gz
Size 733.5 kB
Tags Source
SHA-256 checksum
How to use checksums
513ec05cbf16a0b343daaf54480512918b6cbdd8174e98fdbfcfe4b11da5e1fd
BLAKE2b-256 checksum
How to use checksums
f34772b5a0c5c5902c064da76ad7041f814d3a4e7fe7980cc9eea627daed2a0b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.7.1

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

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

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

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

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

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

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

Download URL tach-0.35.2-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
0d8b8059ca7b87934b15a4082bd86b559ea7f09c97473288a3b53837191a0ec5
BLAKE2b-256 checksum
How to use checksums
6bd8798e6fd75ce233a720dadd439aa97e588fb9b13c803f0814f4c81e19380c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.7.1

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

Download URL tach-0.35.2-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
10d9e750ed8248c7f389e6edf437c6810cee6ba2bec1a671da3518d31978ed51
BLAKE2b-256 checksum
How to use checksums
e8ea6f758d288dc5afddb62007b2fa1a7f89848ad7ac56c607f7202fc395cd2d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.7.1

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

Download URL tach-0.35.2-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
a159c176668e048f9e141d36d6a26b6abd51fbafc4f9e0b26c6cf54fa8b22003
BLAKE2b-256 checksum
How to use checksums
d6a2ece8b9dc0a06c6acda620a3935589de90197550a2b874f92a0efc5fcb9a8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.7.1

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

Download URL tach-0.35.2-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
3e9603b72c973e79ec3198a605211c1d72c0852da0c55c4a5c8d6fa93251309e
BLAKE2b-256 checksum
How to use checksums
33759171d8ea395fa376d88499130b2fa471c76e3152ad2b9b6a15fa104ce54b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.7.1

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

Download URL tach-0.35.2-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
2ca91c3de028584fcb26c4e6943472bb7bafe02f24c684f36eb5d4e52e816ddf
BLAKE2b-256 checksum
How to use checksums
207519bbc711e672b6d1a2ad47f1e00e73922f55f7ab9db1b87c1f7ef8309d80
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.7.1

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

Download URL tach-0.35.2-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
b6ef73ebf85ead859f5cf300a32ad20eda44f37fe5b5cf13d48fb9010c75ad1b
BLAKE2b-256 checksum
How to use checksums
aae73eeb5ab753324045bbacc91a128779d456746713443d9197a240ca2da419
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.7.1

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

Download URL tach-0.35.2-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
d54a6c4f6b9bf6766f532a8209ce1b99382d222d2c341f3d1b8532cde833a142
BLAKE2b-256 checksum
How to use checksums
301b4d64ebf3277823742cde1564a9f6080a9f9fab5ce9e08898321c25690b4e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.7.1

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

Download URL tach-0.35.2-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
5aa81d7bed37a4bd8cc0a9fad8d509b568a2e6a342ef225aed08e972c39b81d3
BLAKE2b-256 checksum
How to use checksums
c9ec0140c171dfde4a100efafdc12e05d47efbf75439bcbb1463fc53cb997c87
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.7.1

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

Download URL tach-0.35.2-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
21c0dee130603615db3917d892620d0a0c4411bb092ba0b4e041230bf9ee2e67
BLAKE2b-256 checksum
How to use checksums
835ee0beec17b44fa16ec756863d421e237f41b36decb0e9a14e5b0bc9db894c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.7.1

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

Download URL tach-0.35.2-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
492e97da7269aad62a07797a55d019d418b94ff9f2ebd95599825315a998add8
BLAKE2b-256 checksum
How to use checksums
9ccce88bff3b4778f816ce9355ce9aade60df828b71ac49e4f6d075c80a7a517
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.7.1

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

Download URL tach-0.35.2-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
e66111c6f2f17c4af3752ba1033df899e6c88ef5b2f4d63e74e602fadacdb0c4
BLAKE2b-256 checksum
How to use checksums
24f0a0801689b02ac4ea270c52e812c7d89d9770c3b19c2f2d8bbbca8ef2a37a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.7.1

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

Download URL tach-0.35.2-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
d277f3f1418edbc09ef429d78bd842ee8800a02a0dd70dc9a36a4d617727a82f
BLAKE2b-256 checksum
How to use checksums
8ad2cb0ce0a0266147e64cf9fa1ec81914d7a2ecf8af301b7dd39a80deb08e32
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.7.1

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

Download URL tach-0.35.2-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
2c2b974d3faf20c7b16b01ff310a947c20e31479d1f07c878969d8b6bcab4e50
BLAKE2b-256 checksum
How to use checksums
b2d70bbdfb0d25981880cada3ca1b5e1cb0e3382b61cb90bf5c25670504b7455
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.2 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