{"repo":"romis2012/mongojet","free":true,"listed":false,"github":"https://github.com/romis2012/mongojet","clone":"git clone https://github.com/romis2012/mongojet.git","description":"Asynchronous (asyncio) MongoDB client for Python","language":"Rust","stars":21,"topics":["asyncio","database-driver","mongodb","python","rust"],"license":"Apache-2.0","category":"databases-storage","readme_excerpt":"Mongojet Async (asyncio) MongoDB client for Python. It uses Rust MongoDB driver and tokio under the hood. Mongojet is 2-4x faster than Motor (and 1.5-3.5x faster than PyMongo AsyncMongoClient) in high concurrency scenarios (see benchmarks below). Requirements - Python = 3.9 - pymongo =4.6.2 (only bson package is required) Installation Usage Mongojet has an API similar to PyMongo/Motor (but not exactly the same) Creating a Client Typically, you should create a single instance of Client per application/process. All client options should be passed via MongoDB connection string. Getting a Database default database database with specific name database with specific name and options Getting a Collection with options Inserting documents insert one insert many Find documents find one (to get a single document) find (to get cursor which is an async iterator) you can iterate over the cursor using the async for loop or collect cursor to list of documents using to list method find many (to get list of documents in single batch) Counting documents Aggregating documents Updating documents replace one update one update many Deleting documents delete one delete many Working with GridFS Simple benchmark (lower is better): find one insert one iterate over cursor","default_branch":null,"files":null,"tree":[],"storefront":"/r/romis2012","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/romis2012/mongojet/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}