-
Notifications
You must be signed in to change notification settings - Fork 20
DOCSP-48168: Async examples for Databases and Collections/Run Command #228
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DOCSP-48168: Async examples for Databases and Collections/Run Command #228
Conversation
✅ Deploy Preview for docs-pymongo ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
|
||
collection_list = await database.list_collection_names() | ||
|
||
async for c in collection_list: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
async for c in collection_list: | |
for c in collection_list: |
list_collection_names()
returns a list, so we can iterate without the async
here.
source/databases-collections.txt
Outdated
|
||
from typing import TypedDict | ||
from pymongo import AsyncMongoClient | ||
from pymongo.database import Database |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from pymongo.database import Database | |
from pymongo.asynchronous.database import Database |
|
||
from typing import TypedDict | ||
from pymongo import AsyncMongoClient | ||
from pymongo.collection import Collection |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from pymongo.collection import Collection | |
from pymongo.asynchronous.collection import Collection |
Pull Request Info
PR Reviewing Guidelines
JIRA - https://jira.mongodb.org/browse/DOCSP-48168
Staging Links
Self-Review Checklist