async_pymongo: Add README

Signed-off-by: wulan17 <wulan17@nusantararom.org>
This commit is contained in:
wulan17 2023-05-21 01:14:11 +07:00
parent 34ff3a5a9f
commit 5d3da1cc0d
No known key found for this signature in database
GPG Key ID: 318CD6CD3A6AC0A5

View File

@ -1 +1,23 @@
## async_pymongo
Asynchronous wrapper for pymongo Asynchronous wrapper for pymongo
### Installing
``` bash
pip3 install async_pymongo
```
### Usage
``` python
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