This repository has been archived on 2024-06-02. You can view files and clone it, but cannot push or open issues or pull requests.
async_pymongo/README.md
wulan17 9fd0af934f
Add comparison with motor
Signed-off-by: wulan17 <wulan17@nusantararom.org>
2023-06-27 01:05:49 +07:00

545 B

async_pymongo

Asynchronous wrapper for pymongo
Comparison

Installing

pip3 install async_pymongo

Usage

from async_pymongo import AsyncClient

async def main():
	conn = AsyncClient("mongodb://...")
	db = conn["database_name"]
	col = db["collections_name"]
	await col.insert_one({"name": "John Smith", "age": 25})
	async for data in col.find({}):
		print(data["name"])

The rest function are same with pymongo but with await