Questions tagged [mongodb-motor]

Motor presents a coroutine-based API for non-blocking access to MongoDB from Tornado or asyncio.

Motor presents a coroutine-based API for non-blocking access to MongoDB from Tornado or asyncio.

Motor wraps almost all of PyMongo’s API and makes it non-blocking.

The source is on GitHub and the docs are on ReadTheDocs.

4 questions
3
votes
1 answer

How can I use motor's open_download_stream work with FastAPI's StreamingResponse?

I'm building a FastAPI endpoint where web client user can essentially download files which are stored in MongoDB as GridFS chunks. However, FastAPI's StreamingResponse doesn't take the supposedly file-like AsyncIOMotorGridOut object returned by…
hamx0r
  • 4,081
  • 1
  • 33
  • 46
2
votes
2 answers

Is it possible to subclass a collection in motor?

So I'm using Motor in my application and I'm looking to create helper functions for interacting with the database, I initially looked into using MongoTurbine but I'm biased against using an ORM, although making routine functions easier to call would…
Jab
  • 26,853
  • 21
  • 75
  • 114
1
vote
1 answer

Version Mismatch Motor PyMongo

I'm trying to connect my database with my code using MongoDB on replit and make a custom prefix command but it gives me a version error when i import motor and saying import pymongo from pymongo import MongoClient import motor Using version ^2.5.1…
TalhaIqbal
  • 15
  • 3
0
votes
0 answers

Scrapy ItemPipeline - "RuntimeError: await wasn't used with future"

Trying to drop duplicates by counting documents with same url. Using Motor (an async driver for MongoDB) for that purposes. Here a process_item function: according to the docs async def process_item(self, item, spider): response =…