Skip to content

A template I frequently use as base for creating simple (single threaded) micro-services

Notifications You must be signed in to change notification settings

ollieellis/python_micro_skeleton

Repository files navigation

Python Microsevice template/skeleton

  • for use as a base for my python microservices
  • it includes a basic endpoint, a Dockerfile, and a pytest test.
  • black pylint and isort are used for linting and formatting (can reduce merge confilcts)

Local development:

pip install -r requirements_local.txt

uvicorn main:app --reload

Docker:

docker build . -t myimage

docker run -p 8000:8000 myimage

Test:

pytest -rP

curl -X POST -H "Content-Type: application/json" -d '{"string": "test", "integer": 10}' http://localhost:8000/endpoint

About

A template I frequently use as base for creating simple (single threaded) micro-services

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published