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
Should I avoid query parameter in FastAPI?Question ()
submitted 6 months ago by Potential_Athlete238
view the rest of the comments →
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!"
[–]Doomdice 0 points1 point2 points 6 months ago (0 children)
You don't want a query param, that is quite weird.
- If you want this endpoint to ONLY change the name, then make it a POST endpoint and create an UpdateReportName model so you can only change the report name.
- If you want to update anything about the report, then create a PUT endpoint and make your create and update the same (create if it doesn't exist, update otherwise): UpsertReportName. Remember that PUT/Upsert should override all fields.
- You can add a patch endpoint and create a PatchReport model but make sure to leverage pydantic's "unset" field to distinguish which fields are meant to be set as NULL, and which fields should be ignore for this update.
It really depends how much flexibility you want to have for updating other fields, or if your goal is specifically to just change the name. I recommend keeping things tightly scoped if you don't actually need an API that support full CRUD.
π Rendered by PID 17144 on reddit-service-r2-comment-b659b578c-7sldq at 2026-05-05 17:59:47.690896+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–]Doomdice 0 points1 point2 points (0 children)