{"id":37545126,"url":"https://github.com/runemalm/ddd-for-python","last_synced_at":"2026-01-16T08:50:15.059Z","repository":{"id":48199715,"uuid":"347595483","full_name":"runemalm/ddd-for-python","owner":"runemalm","description":"A domain-driven design framework for Python.","archived":false,"fork":false,"pushed_at":"2022-03-13T16:54:15.000Z","size":3853,"stargazers_count":84,"open_issues_count":0,"forks_count":11,"subscribers_count":6,"default_branch":"develop","last_synced_at":"2024-08-09T22:35:27.469Z","etag":null,"topics":["ddd","domain-driven-design","hexagonal-architecture"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/runemalm.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}},"created_at":"2021-03-14T09:36:15.000Z","updated_at":"2024-04-15T20:17:37.000Z","dependencies_parsed_at":"2022-09-16T07:00:22.378Z","dependency_job_id":null,"html_url":"https://github.com/runemalm/ddd-for-python","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/runemalm/ddd-for-python","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/runemalm%2Fddd-for-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/runemalm%2Fddd-for-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/runemalm%2Fddd-for-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/runemalm%2Fddd-for-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/runemalm","download_url":"https://codeload.github.com/runemalm/ddd-for-python/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/runemalm%2Fddd-for-python/sbom","scorecard":{"id":789740,"data":{"date":"2025-08-11","repo":{"name":"github.com/runemalm/ddd-for-python","commit":"502f3ce6ee4a6aec8ec131aabf992beda6774544"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.7,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":0,"reason":"Found 1/29 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: GNU General Public License v3.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'develop'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":7,"reason":"3 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-7p79-6x2v-5h88","Warn: Project is vulnerable to: GHSA-8cw9-5hmv-77w6","Warn: Project is vulnerable to: PYSEC-2022-43017 / GHSA-qwmp-2cf2-g9g6"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 2 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-23T07:10:06.962Z","repository_id":48199715,"created_at":"2025-08-23T07:10:06.962Z","updated_at":"2025-08-23T07:10:06.962Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28478048,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T06:30:42.265Z","status":"ssl_error","status_checked_at":"2026-01-16T06:30:16.248Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["ddd","domain-driven-design","hexagonal-architecture"],"created_at":"2026-01-16T08:50:14.207Z","updated_at":"2026-01-16T08:50:15.050Z","avatar_url":"https://github.com/runemalm.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## ddd-for-python\n\nThis is a framework for developing apps based on domain-driven design.\n\nThe design is inspired by Vaughn Vernon's reference implementation of DDD in Java.\n\nA little bit of inspiration also comes from django.\n\n### Purpose:\n\nThe goal of this project is to provide a complete framework for implementing DDD bounded contexts in Python.\n\nRead the user guide in the [documentation](https://ddd-for-python.readthedocs.io/en/latest/) to get started. You can also look at the [example code](https://github.com/runemalm/ddd-for-python/tree/develop/examples/webshop/shipping) of the 'shipping' context.\n\nStar and/or follow the project to receive notifications when version 1.0.0 is released.\n\n### Design: \n\nThe design is based on these patterns:\n\n- DDD (collection of patterns)\n- Hexagonal Architecture\n- Near-infinite Scalability (\"Entity\" concept)\n- xUnit (for testing)\n\n### Theory: \n  \nThe following sources are recommended:\n  \n- [Domain-Driven Design: Tackling Complexity in the Heart of Software - Eric Evans](https://www.amazon.com/Domain-Driven-Design-Tackling-Complexity-Software/dp/0321125215)  \n- [Implementing Domain-Driven Design - Vaughn Vernon](https://www.amazon.com/Implementing-Domain-Driven-Design-Vaughn-Vernon/dp/0321834577)  \n- [Hexagonal Architecture - Alistair Cockburn](https://alistair.cockburn.us/hexagonal-architecture/)\n- [Life Beyond Distributed Transactions - Pat Helland](https://queue.acm.org/detail.cfm?id=3025012)\n- [xUnit - Wikipedia](https://en.wikipedia.org/wiki/XUnit)\n\n### Supported Python Versions:\n\n- Tested with python 3.8.5.\n- Should work with any version \u003e= 3.8.0 (not tested).\n  \n### Installation:\n  \n```bash\n$ pip install ddd-for-python\n```\n  \n### Example:\n\n```python\n# This is the \"main.py\" file that\n# starts the bounded context in a container.\n\nfrom ddd.application.config import Config\nfrom ddd.infrastructure.container import Container\n\nfrom shipping.utils.dep_mgr import DependencyManager\nfrom shipping.application.shipping_application_service import \\\n    ShippingApplicationService\n\n\nif __name__ == \"__main__\":\n    \"\"\"\n    This is the container entry point.    \n    Creates the application service and runs it in the container.\n    \"\"\"\n    \n    # Config\n    config = Config()\n\n    # Dependency manager\n    dep_mgr = \\\n        DependencyManager(\n            config=config,\n        )\n\n    # Application service\n    service = \\\n        ShippingApplicationService(\n            customer_repository=dep_mgr.get_customer_repository(),\n            db_service=dep_mgr.get_db_service(),\n            domain_adapter=dep_mgr.get_domain_adapter(),\n            domain_publisher=dep_mgr.get_domain_publisher(),\n            event_repository=dep_mgr.get_event_repository(),\n            interchange_adapter=dep_mgr.get_interchange_adapter(),\n            interchange_publisher=dep_mgr.get_interchange_publisher(),\n            job_adapter=dep_mgr.get_job_adapter(),\n            job_service=dep_mgr.get_job_service(),\n            log_service=dep_mgr.get_log_service(),\n            scheduler_adapter=dep_mgr.get_scheduler_adapter(),\n            shipment_repository=dep_mgr.get_shipment_repository(),\n            max_concurrent_actions=config.max_concurrent_actions,\n            loop=config.loop.instance,\n        )\n\n    # ..register\n    dep_mgr.set_service(service)\n\n    # Container\n    container = \\\n        Container(\n            app_service=service,\n            log_service=dep_mgr.get_log_service(),\n        )\n\n    # ..run\n    loop = config.loop.instance\n    loop.run_until_complete(container.run())\n    loop.close()\n```\n\nFor the full code, see: \"examples/webshop/shipping\".\n  \n### Documentation:\n  \nYou can find the latest [documentation](https://ddd-for-python.readthedocs.io/en/latest/) at readthedocs.\n\n### Contribution:\n  \nIf you want to contribute to the code base, create a pull request on the develop branch.\n  \n### Release Notes:\n\n**0.9.5** - 2022-03-13\n- Added [documentation](https://ddd-for-python.readthedocs.io/en/latest/).\n- Moved db_service related classes.\n- Moved event related classes.\n- Added MemoryPostgresDbService to be able to run tests against an in-memory postgres database.\n- Fixed bug: container kwarg in example main.py (thanks euri10).\n\n**0.9.4** - 2021-05-17\n- Added 'context' to log service's log messages.\n- Moved record filtering methods to base repository class.\n- Added 'uses_service' to Task class. Deprecate 'makes_requests'.\n\n**0.9.3** - 2021-03-27\n- Searching env file from cwd by default in tests, (when no path specified).\n- Refactored Task class to make it more simple.\n- Refactored the configuration solution by adding a Config class.\n- Added example code for 'shipping' context of a webshop application.\n- Added get_all_jobs() and get_job_count() to scheduler adapter \u0026 service.\n- Added missing call to _migrate() in a couple of Repository class functions.\n\n**0.9.2** - 2021-03-15\n- Fixed bug: Env file wasn't loaded in certain circumstances.\n\n**0.9.1** - 2021-03-14\n- Initial commit.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frunemalm%2Fddd-for-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frunemalm%2Fddd-for-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frunemalm%2Fddd-for-python/lists"}