Sign inSign up

cavallo71/upython-fastapi

By cavallo71

Updated over 2 years ago

Image
0

325

cavallo71/upython-fastapi repository overview

The (mostly) minimal fastapi service

This is the most minimal image to run fastapi services.

Instruction

Create the fastapi "hello world" application:

Write a main.py file in the current directory:

from fastapi import FastAPI

app = FastAPI()

@app.get("/")
async def root():
    return {"message": "Hello World"}

Launch the fastapi service

On windows:

docker run -v %CD%:/appsdir -p 127.0.0.1:9000:8000 --rm -ti cavallo71/upython-fastapi

or *nix:

docker run -v $(pwd):/appsdir -p 127.0.0.1:9000:8000 --rm -ti cavallo71/upython-fastapi

Connect opening the following url http://127.0.0.1:9000

Tag summary

Content type

Image

Digest

sha256:8d1280583

Size

88.4 MB

Last updated

over 2 years ago

docker pull cavallo71/upython-fastapi