FastApp (0.1.3)

Download OpenAPI specification:Download

Example ML Server with FastAPI

fastapp

Ping

Return a Health Response

Responses

Response samples

Content type
application/json
{
  • "healthy": true,
  • "status": 0,
  • "timestamp": "2019-08-24T14:15:22Z"
}

utilities

Generic Request

Example Post Request with Expected Data

Request Body schema: application/json
example
required
integer (Example)
another_example
required
string (Another Example)

Responses

Request samples

Content type
application/json
{
  • "example": 0,
  • "another_example": "string"
}

Response samples

Content type
application/json
{
  • "example": 0,
  • "another_example": "string"
}

machine learning

Get Most Similar

Get a Gensim gensim.most_similar response

Request Body schema: application/json
positive
Array of strings (Positive)
Default: []
negative
Array of strings (Negative)
Default: []
topn
integer (Topn)
Default: 10

Responses

Request samples

Content type
application/json
{
  • "positive": [ ],
  • "negative": [ ],
  • "topn": 10
}

Response samples

Content type
application/json
null

Get Sentiment

Get a SentimentIntensityAnalyzer polarity_scores response

Request Body schema: application/json
required
Text (string) or Array of Text (strings) (Text)

Responses

Request samples

Content type
application/json
{
  • "text": "string"
}

Response samples

Content type
application/json
[
  • {
    }
]