{"categories":[{"label":"Testing","url":"https://skillfed.io/packages/category/software-development-testing/4"},{"label":"Unit","url":"https://skillfed.io/packages/category/software-development-testing-unit"}],"enrichment":{"capability":"PyTestArch lets you define and test architectural rules for Python code by analyzing module imports and dependencies, catching violations where modules import from places they shouldn't.","skillfed_tags":["architecture-testing","import-validation","pytest-plugin"],"use_cases":["Enforce layered architecture by preventing lower layers from importing upper layers in a multi-tier application.","Prevent circular dependencies between modules by defining rules that catch them during test runs.","Document and validate that certain modules remain isolated (e.g., internal utilities not imported by external code).","Catch accidental cross-team dependencies in large codebases by defining import policies per module group.","Integrate architecture checks into CI/CD pipelines as part of your test suite alongside unit and integration tests."],"what_it_does":"PyTestArch is a testing framework that lets you codify architectural rules for Python projects and verify that your codebase respects them. It scans your source code to build a dependency graph, then lets you write rules declaratively (e.g., \"module B should never be imported by module A\") and assert those rules hold. It's inspired by ArchUnit and integrates naturally with pytest.\n\nThe package depends only on networkx for graph operations and optionally matplotlib for visualization. It supports Python 3.9 through 3.13 and has been actively maintained since its initial release in 2022, with a recent update in August 2025.","worth_installing":"Yes. PyTestArch is actively maintained, has no known vulnerabilities, installs with minimal friction, and solves a real problem\u2014catching architectural violations early. It's well-suited for teams that want to enforce module-level design constraints. The permissive Apache-2.0 license poses no barrier. Start with the basic rule DSL shown in the docs; optional visualization requires matplotlib."},"id":"pytestarch","links":{"html":"https://skillfed.io/packages/pytestarch","md":"https://skillfed.io/packages/pytestarch.md","pypi":"https://pypi.org/project/pytestarch/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2025-08-08","license_spdx":null,"license_treatment":"permissive","name":"PyTestArch","python_support":"supports_current","summary":"Test framework for software architecture based on imports between modules"},"popularity":{"monthly_downloads":219634,"position":9323,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"4.0.1"}
