A Python linting tool
Project description
chine
Chine is a static architecture checker for Python. It parses your code with ast, reads declared
architecture roles, and reports dependency violations without importing or executing your modules.
What chine checks
Declare a role at module level:
__architecture_role__ = "use_case"
Supported roles:
use_casedomain_policy(anddomain)adapter
Current rules:
ARCH001: use case modules must not import adapter modulesARCH002: domain/domain_policy modules must not import adapter modulesARCH003: domain/domain_policy modules must not import use case modules
Modules without __architecture_role__ are treated as untyped (Any) for architecture checks.
Installation
Install from PyPI:
pip install chine
Or with pipx:
pipx install chine
End-user usage
Show CLI help:
chine --help
Check the current directory:
chine check
Check a specific path:
chine check src/
Show version:
chine --version
When no violations are found, chine exits successfully. If violations are found, it prints each
ARCH rule violation with file and line number and exits with a non-zero status.
Development
uv sync --all-extras
uv run ruff check src/
uv run mypy src/
uv run pytest
License
See LICENSE for details.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file chine-0.1.2.tar.gz.
File metadata
- Download URL: chine-0.1.2.tar.gz
- Upload date:
- Size: 5.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
62530eaa6905e957c358cd042ec385818e53ee96c2747bc3f16dba8aab1792c1
|
|
| MD5 |
0d10cdf1035172e7ab834f58ca358174
|
|
| BLAKE2b-256 |
1f4d580eed2614088536d746909b288479f73674aa7958d613e301dee78f8f11
|
Provenance
The following attestation bundles were made for chine-0.1.2.tar.gz:
Publisher:
release.yml on jbrixon/chine
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
chine-0.1.2.tar.gz -
Subject digest:
62530eaa6905e957c358cd042ec385818e53ee96c2747bc3f16dba8aab1792c1 - Sigstore transparency entry: 1346792752
- Sigstore integration time:
-
Permalink:
jbrixon/chine@7c5f48bb0173b59c2ca9a7469f34b1d82bb22064 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/jbrixon
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@7c5f48bb0173b59c2ca9a7469f34b1d82bb22064 -
Trigger Event:
workflow_run
-
Statement type:
File details
Details for the file chine-0.1.2-py3-none-any.whl.
File metadata
- Download URL: chine-0.1.2-py3-none-any.whl
- Upload date:
- Size: 6.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d83b3d8412dba1aaea1e89d22808965dfaa22d28d66263c1c1ee0ddf64d8dc47
|
|
| MD5 |
38e3790909b0dd3d7042f4aeceef9571
|
|
| BLAKE2b-256 |
3106ff74710fc1d7ddd95f9ea554835e09a7d6d53b829c0dcd35748cbc9287ee
|
Provenance
The following attestation bundles were made for chine-0.1.2-py3-none-any.whl:
Publisher:
release.yml on jbrixon/chine
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
chine-0.1.2-py3-none-any.whl -
Subject digest:
d83b3d8412dba1aaea1e89d22808965dfaa22d28d66263c1c1ee0ddf64d8dc47 - Sigstore transparency entry: 1346792829
- Sigstore integration time:
-
Permalink:
jbrixon/chine@7c5f48bb0173b59c2ca9a7469f34b1d82bb22064 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/jbrixon
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@7c5f48bb0173b59c2ca9a7469f34b1d82bb22064 -
Trigger Event:
workflow_run
-
Statement type: