$npx skillfedfor your agent

pytest-archon

Rule your architecture like a real developer

With conditionsPyPI Quality AssuranceReleased Sep 202583.9K downloads / moApache Software LicensePure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — pytest_archon-0.0.7-py3-none-any.whl
v0.0.7 · released 2025-09-19 · Python >=3.8 · 1 runtime deps: pytest

Yes, if you want to enforce architectural boundaries in a growing Python project. The low install friction, permissive license, and stable API make it straightforward to adopt. The aging maintenance status (329 days since last release) is a minor concern but not a blocker—the repository is active and the package is marked Production/Stable. Use it when you need testable, explicit rules about module dependencies rather than informal conventions.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.8 or later; pytest must be installed.
  • Low friction install with a single runtime dependency on pytest.
  • Maintenance status is aging—last release was 329 days ago—but the repository is active and not archived, with a stable development status classifier.

License · maintenance · safety

Apache Software License (permissive) — Licensed under Apache Software License (permissive), so you can use, modify, and distribute it freely in commercial and private projects with minimal restrictions.

last release 2025-09-19 (329 days) · last repo commit 2025-09-19 · 89 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 83,877 downloads/mo, #14,043 on PyPI

Verify before relying

pip install pytest-archon

from pytest_archon import archrule

def test_rule_basic():
    (
        archrule("name", comment="some comment")
        .match("pytest_archon.col*")
        .exclude("pytest_archon.colgate")
        .should_not_import("pytest_archon.import_finder")
        .should_import("pytest_archon.core*")
        .check("pytest_archon")
    )
  • Whether the aging maintenance status (329 days since last release) affects stability or security for new Python versions.
  • Performance characteristics when checking large codebases or deeply nested dependency graphs.
Same gist for agents: .md · .json

What it is and what it does

Pytest-archon is a pytest plugin that lets you write tests to enforce architectural rules in your Python codebase. Instead of relying on informal conventions, you define explicit boundaries—specifying which modules can import from which others—and verify them as part of your test suite. It catches circular dependencies, prevents unintended coupling, and makes your project structure explicit for new team members.

You write rules using a fluent API that matches module patterns (via fnmatch or regex), excludes specific modules, and specifies allowed or forbidden imports. The check method can inspect toplevel imports only, skip TYPE_CHECKING blocks, or include transitive dependencies, giving you fine-grained control over what gets validated. Rules are tied directly to your codebase, so they stay in sync with actual application structure.

Use it for

  • Enforce that a domain model layer has no dependencies on other submodules, keeping it reusable and decoupled.
  • Verify that utility or common modules are actually used by multiple parts of the codebase, preventing dead code.
  • Prevent circular imports between major architectural layers (e.g., controllers cannot import from views).
  • Document and test the intended module hierarchy for new team members through executable rules.
  • Catch unintended coupling between components during development before it becomes entrenched.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you want to enforce architectural boundaries in a growing Python project.

The low install friction, permissive license, and stable API make it straightforward to adopt. The aging maintenance status (329 days since last release) is a minor concern but not a blocker—the repository is active and the package is marked Production/Stable. Use it when you need testable, explicit rules about module dependencies rather than informal conventions.

Install

pytest-archon on PyPI

Before you install

Low friction install with a single runtime dependency on pytest. Maintenance status is aging—last release was 329 days ago—but the repository is active and not archived, with a stable development status classifier.

Requires Python 3.8 or later; pytest must be installed.

License in practice

Licensed under Apache Software License (permissive), so you can use, modify, and distribute it freely in commercial and private projects with minimal restrictions.

Quickstart

pip install pytest-archon

from pytest_archon import archrule

def test_rule_basic():
    (
        archrule("name", comment="some comment")
        .match("pytest_archon.col*")
        .exclude("pytest_archon.colgate")
        .should_not_import("pytest_archon.import_finder")
        .should_import("pytest_archon.core*")
        .check("pytest_archon")
    )

Verify before relying

  • Whether the aging maintenance status (329 days since last release) affects stability or security for new Python versions.
  • Performance characteristics when checking large codebases or deeply nested dependency graphs.

Package facts

LicenseApache Software License permissive
Python supportSupports the current Python release >=3.8
Install frictionLow. Pure-Python wheel
Runtime dependencies
1 package
pytest
MaintenanceAging 329 days since the last release
Last repo commit
First released
Downloads83,877 / month, #14,043 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableFramework :: PytestLicense :: OSI Approved :: Apache Software LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Evidence: pytest_archon-0.0.7-py3-none-any.whl

Tags

Capabilities
architecture testing pythonforbidden dependencies enforcementcircular dependency detectionmodule import rulescode structure validationpytest architecture rulesdependency boundaries testing
Topics
architecture-testingdependency-management

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “forbidden dependencies enforcement”

  • pytest-archonPytest-archon lets you define and test architectural boundaries in…
  • liccheckScans Python project dependencies in requirements.txt or…
  • planarityTests whether a graph is planar, computes planar embeddings, draws…

Give your agent the search over MCP, or paste the wish link into any chat.

More Quality Assurance packages

coverage Worth it
PyPI · Testing · released Aug 2026

Coverage.py measures which lines of Python code are executed during test runs, reporting coverage percentages and identifying untested code paths.

Install it if you want to measure test completeness or enforce coverage thresholds in your project.

permissive licensepure Python · 3.10+
335.8Mdownloads / mo
ruff Worth it
PyPI · Python Modules · released Aug 2026

Ruff is a Python linter and code formatter written in Rust that combines linting, formatting, and code fixing into a single tool, replacing Flake8, Black, isort, and related utilities.

MITcompiled wheel · 3.7+
316.1Mdownloads / mo
pexpect With conditions
PyPI · Software Development · released Nov 2023

Pexpect spawns and controls interactive console applications by sending input and matching output patterns, automating tasks that would otherwise require manual interaction.

ISCpure Pythonaging
200.8Mdownloads / mo
black Worth it
PyPI · Python Modules · released May 2026

Black reformats Python source code to a consistent style by parsing entire files and rewriting them according to an opinionated, deterministic set of rules, eliminating manual formatting decisions.

MITpure Python · 3.10+
179.9Mdownloads / mo
pytest-xdist Worth it
PyPI · Utilities · released Jul 2025

pytest-xdist distributes pytest tests across multiple CPU cores or machines to speed up test execution, with the simplest usage being `pytest -n auto` to spawn workers equal to available CPUs.

Install it if your test suite takes long enough that parallelization would save meaningful time.

MITpure Python · 3.9+
177.1Mdownloads / mo
cfn-lint Worth it
PyPI · Quality Assurance · released Aug 2026

Validates AWS CloudFormation templates in YAML or JSON format against resource provider schemas and best practices, checking property values and configuration correctness.

Install it if you work with CloudFormation templates.

MIT-0pure Python
114.9Mdownloads / mo

See also PyTestArch · tach · import-linter · import-deps · omnibase_spi · pytest-isort · coverage-conditional-plugin · rules · mo-imports · uncalled