Sunday, September 5, 2021

fastApi Demo

Using Json File:

 https://github.com/Code360In/mathlib


Tools:


https://github.com/cckcoder/fastapi-student-traning


Postres:


https://github.com/Jayvirrathi/fastapi-postgresql-rest-api


Static :


https://github.com/heohy/FastAPI


Example:


https://github.com/dinb1242/fastapi-tutorial


Understand:


https://github.com/s-ahuja/fastapi-get-started


Tutorials:

https://github.com/Code360In/fastapi-series


https://github.com/eugenex-lab/FastAPi-with-SQLIte-


https://github.com/heavenluv/FastApi_ImageToText

One Docker: https://github.com/mfdz88/katacoda-scenarios

----------

from enum import Enum
from fastapi import FastAPI
class ModelName(str, Enum):
alexnet = "alexnet"
resnet = "resnet"
lenet = "lenet"
app = FastAPI()
@app.get("/models/{model_name}")
async def get_model(model_name: ModelName):
if model_name == ModelName.alexnet:
return {"model_name": model_name, "message": "Deep Learning FTW!"}
if model_name.value == "lenet":
return {"model_name": model_name, "message": "LeCNN all the images"}
return {"model_name": model_name, "message": "Have some residuals"} ------------------



No comments:

KQL OPER

  Understanding KQL Operators Let's take a look at Kusto Query Language (KQL) operators and how they can help build powerful queries. Un...