Giter Club home page Giter Club logo

fastapi_skeleton's Introduction

fastapi_skeleton

Simple fastapi skeleton for a stateless microservice (application for ml models, optimization, ...)

Running service manually

To run the service manually in debug mode install the required python dependencies:

poetry install

You can run the service in debug mode without gunicorn:

./run_debug.sh

Running service in Docker

To build the Docker image:

docker build -t "fastapi-api:latest" . --build-arg FASTAPI_ENV=develop

To run the Docker image:

docker run -p 5000:5000 -ti fastapi-api:latest

Local querying

To check that the service is alive, run:

curl -X GET "http://localhost:5000/health" -H "accept: application/json"

curl -X GET "http://localhost:5000/v1/health" -H "accept: application/json"

API Documentation

The user interface for the API is defined in http://localhost:5000/docs endpoint.

Testing

To run the tests:

poetry run python -m pytest --verbose --cov=./

fastapi_skeleton's People

Contributors

steffenhaeussler avatar dependabot[bot] avatar

Stargazers

 avatar 荣码人生 avatar

Watchers

 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.