Skip to content

A reverse-engineering of Java Spring Cloud's Service Discovery (Eureka), Load-Balancer (Ribbon) and API Gateway that totally follows the original Spring Cloud's object-oriented design. This project is not industry-ready since it's only for demonstrating the OOD concept. The design slides can be found at the link below.

License

Notifications You must be signed in to change notification settings

Spring-Cloud-In-Python/Spring-Cloud-in-Python

Repository files navigation

Spring-Cloud-in-Python

Pre-commit

Before starting to commit

TBD: poetry or pipenv or other package manager CMT: Here I use poetry as an example first

Dev Python Version: 3.7.9

  1. Download poetry by using:
# For linux and unix-like users
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python -
# For windows user, you will need your powershell or just use the subsystem
# If you wish to use powershell, the follow cmd is for you
# (Invoke-WebRequest -Uri https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py -UseBasicParsing).Content | python -
  1. Install existing dependencies
# Running locally for dev / test env etc
poetry install
# On pp / prod
poetry install --no-dev
  1. Add new package: never ever pip install :)
# Example
poetry add django
# For dev only
poetry add --dev ipython
# If you wish to test something on you local but not add it to the "lock"
poetry add --no-root xxx
  1. To run python or some other packages that offer cli
# Boot django server in local
poetry run python manage.py runserver
# Or a lazy way, just enable the shell
poetry shell
python manage.py runserver
  1. After running poetry install on local, for the very first time. Please run:
poetry run pre-commit install
  1. Start to commit :)

Test

  1. Show test coverage report on terminal

poetry run pytest --cov-report term --cov spring_cloud tests/

About

A reverse-engineering of Java Spring Cloud's Service Discovery (Eureka), Load-Balancer (Ribbon) and API Gateway that totally follows the original Spring Cloud's object-oriented design. This project is not industry-ready since it's only for demonstrating the OOD concept. The design slides can be found at the link below.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages