skip to Main Content

why doesnt fastapi return my mongodb objects?

So I am trying to make a request on the route: http://127.0.0.1:8000/testadmins with the folowing function: @app.get("/testadmins/") async def get_admins(): return await get_database() get_database() is this: async def get_database(): uri = "(my mongo uri)" client = MongoClient(uri, server_api=ServerApi('1')) adms =…

VIEW QUESTION

How to process a JSON file to include only 4 fields from each item?

This is what my JSON file looks like: [ { "id": 13445, "uuid": "bf1923c5-a198-409b-851e-c67f7b8a661e", "created_at": "2021-07-27 12:41:31.715922", "updated_at": "2021-11-10 21:41:41.857982", "meta": { "osm_id": null, "google_maps_place_id": "ChIJO4sAE5d-1EARsPwZh_s6eX4" }, "type": "VILLAGE", "name": { "en": "Dіbrіvka", "ru": "Дибривка", "uk": "Дібрівка" }, "public_name": {…

VIEW QUESTION

Azure Form Recognizer – "TrainingContentMissing", Training data is missing: Could not find any training data at the given path

I am working with Form Recognizer in Python (version 3.2.1). I'm attempting to train a custom model with pdf's in Azure storage container, code and error below: document_model_admin_client = DocumentModelAdministrationClient(endpoint, credential) poller = await document_model_admin_client.begin_build_document_model( ModelBuildMode.TEMPLATE, blob_container_url="[PATH TO AZURE STORAGE…

VIEW QUESTION
Back To Top
Search