Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Example application code for the python architecture book

License

NotificationsYou must be signed in to change notification settings

cosmicpython/code

Repository files navigation

Chapters

Each chapter has its own branch which contains all the commits for that chapter,so it has the state that corresponds to theend of that chapter.If you want to try and code along with a chapter,you'll want to check out the branch for the previous chapter.

https://github.com/cosmicpython/code/branches/all

Exercises

Branches for the exercises follow the convention{chapter_name}_exercise,eghttps://github.com/cosmicpython/code/tree/chapter_04_service_layer_exercise

Requirements

  • docker with docker-compose
  • for chapters 1 and 2, and optionally for the rest: a local python3.8 virtualenv

Building the containers

(this is only required from chapter 3 onwards)

make buildmake up# ormake all# builds, brings containers up, runs tests

Creating a local virtualenv (optional)

python3.8 -m venv .venv&&source .venv/bin/activate# or however you like to create virtualenvs# for chapter 1pip install pytest# for chapter 2pip install pytest sqlalchemy# for chapter 4+5pip install -r requirements.txt# for chapter 6+pip install -r requirements.txtpip install -e src/

Running the tests

maketest# or, to run individual test typesmake unit-testsmake integration-testsmake e2e-tests# or, if you have a local virtualenvmake uppytest tests/unitpytest tests/integrationpytest tests/e2e

Makefile

There are more useful commands in the makefile, have a look and try them out.

About

Example application code for the python architecture book

Resources

License

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp