{"id":13474283,"url":"https://github.com/cosmicpython/code","last_synced_at":"2025-05-15T01:06:35.457Z","repository":{"id":37336009,"uuid":"169221290","full_name":"cosmicpython/code","owner":"cosmicpython","description":"Example application code for the python architecture book","archived":false,"fork":false,"pushed_at":"2024-07-01T20:50:39.000Z","size":549,"stargazers_count":2315,"open_issues_count":32,"forks_count":1013,"subscribers_count":50,"default_branch":"master","last_synced_at":"2025-04-11T14:16:52.570Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cosmicpython.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"license.txt","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":"2019-02-05T10:12:34.000Z","updated_at":"2025-04-07T13:49:52.000Z","dependencies_parsed_at":"2024-03-01T16:27:48.670Z","dependency_job_id":"59303d1e-175a-48b7-a684-3ca68b0c43b7","html_url":"https://github.com/cosmicpython/code","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cosmicpython%2Fcode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cosmicpython%2Fcode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cosmicpython%2Fcode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cosmicpython%2Fcode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cosmicpython","download_url":"https://codeload.github.com/cosmicpython/code/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254254041,"owners_count":22039792,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-07-31T16:01:11.032Z","updated_at":"2025-05-15T01:06:30.448Z","avatar_url":"https://github.com/cosmicpython.png","language":"Python","readme":"# Example application code for the python architecture book\n\n## Chapters\n\nEach chapter has its own branch which contains all the commits for that chapter,\nso it has the state that corresponds to the _end_ of that chapter.\nIf you want to try and code along with a chapter,\nyou'll want to check out the branch for the previous chapter.\n\nhttps://github.com/cosmicpython/code/branches/all\n\n\n## Exercises\n\nBranches for the exercises follow the convention `{chapter_name}_exercise`,\neg https://github.com/cosmicpython/code/tree/chapter_04_service_layer_exercise\n\n\n## Requirements\n\n* docker with docker-compose\n* for chapters 1 and 2, and optionally for the rest: a local python3.8 virtualenv\n\n\n## Building the containers\n\n_(this is only required from chapter 3 onwards)_\n\n```sh\nmake build\nmake up\n# or\nmake all # builds, brings containers up, runs tests\n```\n\n## Creating a local virtualenv (optional)\n\n```sh\npython3.8 -m venv .venv \u0026\u0026 source .venv/bin/activate # or however you like to create virtualenvs\n\n# for chapter 1\npip install pytest \n\n# for chapter 2\npip install pytest sqlalchemy\n\n# for chapter 4+5\npip install -r requirements.txt\n\n# for chapter 6+\npip install -r requirements.txt\npip install -e src/\n```\n\n\u003c!-- TODO: use a make pipinstall command --\u003e\n\n\n## Running the tests\n\n```sh\nmake test\n# or, to run individual test types\nmake unit-tests\nmake integration-tests\nmake e2e-tests\n# or, if you have a local virtualenv\nmake up\npytest tests/unit\npytest tests/integration\npytest tests/e2e\n```\n\n## Makefile\n\nThere are more useful commands in the makefile, have a look and try them out.\n\n","funding_links":[],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcosmicpython%2Fcode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcosmicpython%2Fcode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcosmicpython%2Fcode/lists"}