Some of the most common design patterns implemented in Python.
This project uses pyenv and pyenv-virtualenv to manage the Python virtual environment, and poetry to manage the project dependencies.
If you don't have python 3.x.x
, you have to install it. For example, I'm using 3.7.2
.
pyenv install 3.7.2
Create a virtual environment and activate it.
pyenv virtualenv 3.7.2 design_patterns
pyenv activate design_patterns
Install all the dependencies from the poetry.lock
file.
poetry install
If you want you can run all tests with:
poetry run pytest
You can also test the MVC pattern with:
cd mvc
poetry run python model_view_controller.py