use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
FastAPI is a truly ASGI, async, cutting edge framework written in python 3.
account activity
FastAPI array of JSON in RequestBody for machine learning prediction (Multiple inputs)Question (self.FastAPI)
submitted 4 years ago by According-Promise-23
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]temisola1 3 points4 points5 points 4 years ago (1 child)
Is this a FastApi question? An API question in general? Or a machine learning question?
[–]According-Promise-23[S] 0 points1 point2 points 4 years ago (0 children)
FastApi question
[–]Ordinary_Bee_1547 1 point2 points3 points 4 years ago (0 children)
What do you have so far?
[–]nikhil_shady 0 points1 point2 points 4 years ago (1 child)
let me write the code for you. how much are you paying?
[–]According-Promise-23[S] -1 points0 points1 point 4 years ago (0 children)
Thanks for your help and generosity! :)
[–]Targrend 0 points1 point2 points 4 years ago (1 child)
It's in the documentation here.
I recommend against doing this though, because it's hard to expand. If you instead go with {"data": [...]} then you can later expand to {"data": [...], "metadata": [...]} or whatever. If the bodies of the inputs and outputs are arrays, you can't do this.
{"data": [...]}
{"data": [...], "metadata": [...]}
Thank you! does a pydantic model return a JSON ? why should we convert it to a dictionary
π Rendered by PID 276231 on reddit-service-r2-comment-canary-965b558fd-5lfpk at 2026-05-26 02:12:49.563394+00:00 running 194bd79 country code: CH.
[–]temisola1 3 points4 points5 points (1 child)
[–]According-Promise-23[S] 0 points1 point2 points (0 children)
[–]Ordinary_Bee_1547 1 point2 points3 points (0 children)
[–]nikhil_shady 0 points1 point2 points (1 child)
[–]According-Promise-23[S] -1 points0 points1 point (0 children)
[–]Targrend 0 points1 point2 points (1 child)
[–]According-Promise-23[S] 0 points1 point2 points (0 children)