Giter VIP home page Giter VIP logo

python-architecture-pattern-code's Introduction

Example application code for the python architecture book

Chapters

Each chapter has its own branch which contains all the commits for that chapter, so it has the state that corresponds to the end 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, eg https://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 build
make up
# or
make 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 1
pip install pytest 

# for chapter 2
pip install pytest sqlalchemy

# for chapter 4+5
pip install -r requirements.txt

# for chapter 6+
pip install -r requirements.txt
pip install -e src/

Running the tests

make test
# or, to run individual test types
make unit-tests
make integration-tests
make e2e-tests
# or, if you have a local virtualenv
make up
pytest tests/unit
pytest tests/integration
pytest tests/e2e

Makefile

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

python-architecture-pattern-code's People

Contributors

hjwp avatar karolpawlowski avatar geyser avatar adamculp avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.