{"id":19029014,"url":"https://github.com/simonmacor/hexagonal-dependencies-tracker","last_synced_at":"2026-06-23T13:01:44.834Z","repository":{"id":254025877,"uuid":"845256232","full_name":"simonmacor/hexagonal-dependencies-tracker","owner":"simonmacor","description":"Python Hexagonal Architecture Compliance Checker","archived":false,"fork":false,"pushed_at":"2024-08-29T01:28:41.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-21T19:45:29.445Z","etag":null,"topics":["hexagonal-architecture","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/simonmacor.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-20T22:35:36.000Z","updated_at":"2024-08-30T21:23:38.000Z","dependencies_parsed_at":null,"dependency_job_id":"399678c6-e0d0-41f7-83d7-da69cbc99162","html_url":"https://github.com/simonmacor/hexagonal-dependencies-tracker","commit_stats":null,"previous_names":["simonmacor/py_hexagonal_dependencies_tracker","simonmacor/hexagonal-dependencies-tracker"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/simonmacor/hexagonal-dependencies-tracker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonmacor%2Fhexagonal-dependencies-tracker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonmacor%2Fhexagonal-dependencies-tracker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonmacor%2Fhexagonal-dependencies-tracker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonmacor%2Fhexagonal-dependencies-tracker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simonmacor","download_url":"https://codeload.github.com/simonmacor/hexagonal-dependencies-tracker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonmacor%2Fhexagonal-dependencies-tracker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34690771,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-23T02:00:07.161Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hexagonal-architecture","python"],"created_at":"2024-11-08T21:12:58.314Z","updated_at":"2026-06-23T13:01:44.774Z","avatar_url":"https://github.com/simonmacor.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![CI](https://github.com/simonmacor/py_hexagonal_dependencies_tracker/actions/workflows/ci.yml/badge.svg)](https://github.com/simonmacor/py_hexagonal_dependencies_tracker/actions/workflows/ci.yml)\n# Python Hexagonal Architecture Compliance Checker\n## Overview\n\nHexagonal Architecture Compliance Checker is a Python script designed to enforce and verify compliance with hexagonal architecture principles in your Python projects. It checks whether the imports in your code adhere to the specified layer dependencies defined in a configuration file. The script can also handle exceptions where certain imports are allowed under specific conditions, generating warnings with explanations.\n\n## Features\n\n- Layer Dependency Verification: Ensures that modules only import from allowed layers.\n- Customizable Rules: Define allowed imports and exceptions in a YAML configuration file.\n- Warning for Allowed Violations: Generate warnings for exceptions where imports are allowed.\n\n## Installation\n\nYou can install the Hexagonal Architecture Compliance Checker as a package using setup.py. Follow these steps:\n\n1. Clone the Repository (if applicable):\n\n``` bash\n\ngit clone git@github.com:simonmacor/py_hexagonal_dependencies_tracker.git\ncd py_hexagonal_dependencies_tracker\n```\n\n2. Install the Package:\nNavigate to the directory containing setup.py and run the following command to install the package and its dependencies:\n\n```bash\n\npip install .\n```\n\n## Configuration\n\nCreate a YAML configuration file named hexagonal.yml (or another name of your choice) in your project directory. The configuration file should define the layers, dependencies, and any allowed violations.\n### Example hexagonal.yml\n\n```yaml\n\nlayers:\n  domain:\n    - \"my_project/domain\"\n  application:\n    - \"my_project/application\"\n  adapters:\n    - \"my_project/adapters\"\n    - \"my_project/infrastructure\"\n  ui:\n    - \"my_project/ui\"\n    - \"my_project/web\"\n\ndependencies:\n  domain: []\n  application:\n    - \"domain\"\n  adapters:\n    - \"application\"\n    - \"domain\"\n  ui:\n    - \"application\"\n\nallowed_violations:\n  - module: \"os\"\n    file: \"my_project/domain/special_case.py\"\n    reason: \"os module is allowed here due to specific system interactions.\"\n```\n\n## Usage\n\nRun the script from the command line, specifying the path to your YAML configuration file:\n\n### Default Configuration File\n\nIf your configuration file is named hexagonal.yml and located in the same directory as the script, use:\n\n```bash\npython verify_architecture.py\n```\n\n### Custom Configuration File\n\nTo specify a different configuration file, use the -c or --config option:\n\n```bash\npython verify_architecture.py -c path/to/your_config.yml\n```\n## Testing\n\nTo run tests on the script, make sure you have unittest available. You can execute the tests by running:\n\n``` bash\n\npython -m unittest tests/test_verify_architecture.py\n```\n\n## Contributing\n\nIf you find any issues or have suggestions for improvements, feel free to open an issue or submit a pull request. Contributions are welcome!\n\n## License\n\nThis project is licensed under the MIT License. See the LICENSE file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonmacor%2Fhexagonal-dependencies-tracker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimonmacor%2Fhexagonal-dependencies-tracker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonmacor%2Fhexagonal-dependencies-tracker/lists"}