Skip to content

Commit 5d3da1c

Browse files
committed
async_pymongo: Add README
Signed-off-by: wulan17 <wulan17@nusantararom.org>
1 parent 34ff3a5 commit 5d3da1c

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,23 @@
1+
## async_pymongo
12
Asynchronous wrapper for pymongo
3+
4+
### Installing
5+
6+
``` bash
7+
pip3 install async_pymongo
8+
```
9+
10+
### Usage
11+
12+
``` python
13+
from async_pymongo import AsyncClient
14+
15+
async def main():
16+
conn = AsyncClient("mongodb://...")
17+
db = conn["database_name"]
18+
col = db["collections_name"]
19+
await col.insert_one({"name": "John Smith", "age": 25})
20+
async for data in col.find({}):
21+
print(data["name"])
22+
```
23+
The rest function are same with pymongo but with await

0 commit comments

Comments
 (0)