Fork of asynchronous wrapper for pymongo https://github.com/Mayuri-Chan/async_pymongo
Go to file
Profitroll 2b2222bedb
Support for Python 3.8
2023-08-14 10:46:25 +02:00
.github Create FUNDING.yml 2023-06-24 18:58:09 +07:00
async_pymongo Support for Python 3.8 2023-08-14 10:46:25 +02:00
tests Initial import from https://github.com/userbotindo/Anjani/tree/staging/anjani/util/db 2023-05-19 19:54:16 +07:00
.gitignore Add comparison with motor 2023-06-27 01:05:49 +07:00
LICENSE Initial import from https://github.com/userbotindo/Anjani/tree/staging/anjani/util/db 2023-05-19 19:54:16 +07:00
README.md Add comparison with motor 2023-06-27 01:05:49 +07:00
comparison.png Add comparison with motor 2023-06-27 01:05:49 +07:00
poetry.lock build(deps): bump pymongo from 4.4.0 to 4.4.1 2023-07-13 22:18:55 +00:00
pyproject.toml Support for Python 3.8 2023-08-14 10:46:25 +02:00

README.md

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