Skip to content

LukasNiessen/ArchUnitPython

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ArchUnitPy

Architecture testing library for Python projects. Inspired by ArchUnitTS.

Installation

pip install archunitpy

Quick Start

from archunitpy import project_files, project_slices, metrics, assert_passes

# No circular dependencies
rule = project_files("src/").in_folder("myapp/**").should().have_no_cycles()
assert_passes(rule)

# Layer dependencies
rule = (
    project_files("src/")
    .in_folder("**/presentation/**")
    .should_not()
    .depend_on_files()
    .in_folder("**/data/**")
)
assert_passes(rule)

# Metrics
rule = metrics("src/").count().lines_of_code().should_be_below(500)
assert_passes(rule)

License

MIT

About

ArchUnitPython is an architecture testing library. Specify and ensure architecture rules in your Python app. Easy setup and pipeline integration.

Topics

Resources

License

Contributing

Stars

247 stars

Watchers

4 watching

Forks

Packages

 
 
 

Contributors

Languages