Fork of asynchronous wrapper for pymongo https://github.com/Mayuri-Chan/async_pymongo
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.
Go to file
2023-06-22 11:46:06 +07:00
.github Create dependabot.yml 2023-06-22 11:41:19 +07:00
async_pymongo Initial import from https://github.com/userbotindo/Anjani/tree/staging/anjani/util/db 2023-05-19 19:54:16 +07:00
tests Initial import from https://github.com/userbotindo/Anjani/tree/staging/anjani/util/db 2023-05-19 19:54:16 +07:00
.gitignore Initial import from https://github.com/userbotindo/Anjani/tree/staging/anjani/util/db 2023-05-19 19:54:16 +07:00
LICENSE Initial import from https://github.com/userbotindo/Anjani/tree/staging/anjani/util/db 2023-05-19 19:54:16 +07:00
poetry.lock build(deps): bump pymongo from 4.3.3 to 4.4.0 2023-06-22 04:41:45 +00:00
pyproject.toml async_pymongo: Bump version to 0.1.3 2023-06-22 11:46:06 +07:00
README.md async_pymongo: Add README 2023-05-22 23:14:52 +07:00

async_pymongo

Asynchronous wrapper for pymongo

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