Relative Content

Tag Archive for fastapi

modify json body with dropdown parameter selected value FastAPi Post Request

i have a fastApi post request endpoint that’s a multipart/form-data with the following params:
model_source: myModelDropdownvlues,
body: myModel = Body(JSON_EXAMPLES.get(“value from dropdown model_source)),
files: List[UploadFile] = File(None),
what i want is when i select an item from the dropdown i want it to pull data from JSON_EXAMPLES
so it can be modified and sent with the request body.

having issues with delete operation using Fastapi and sqlalchemy

I’m a novice in Api development and I have been following this tutorial YouTube and I am currently stock at performing the delete operation, using FastApi and SQL alchemy. I am using postman to test my Apis and each time I send a delete request it sends back a 405 error. I searched through my code but can’t seem to figure out what the problem is can anyone help me out. Here is sample of the code.