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
Adding Async Client to Google-Cloud-Firestore #64
Comments
Hello, I noticed that https://github.com/googleapis/python-firestore/releases/tag/v2.0.0-dev1 added support for async. |
@skgbanga I would say so, though I have left it in dev to allow early usage and a fallback in case we find issues. I was planning to release v2.0.0-dev to v2.0.0 in its state this month. I currently anticipate no changes. |
Really appreciate the new support of One issue though. It doesn't work with the firestore emulator. The following script raises and exception TypeError: Unexpected type of call <class 'google.cloud.firestore_v1.types.firestore.CommitResponse'> Start the firestore emulator and run the script import asyncio
from google.cloud.firestore import AsyncClient
import os
os.environ["FIRESTORE_EMULATOR_HOST"] = "localhost:8080"
client = AsyncClient()
async def save():
return (
await client.collection("test")
.document("test")
.set({"message": "Hello World!"})
)
if __name__ == "__main__":
loop = asyncio.get_event_loop()
loop.run_until_complete(save()) The same issue goes for retrieving data. |
@crwilcox Is there a timeline when listening for realtime updates/streaming is supported with asyncio? |
I don't have a timeline to share at this time. This is on the backlog though. |
What about async support for the emulator? And is there a workaround until it's fixed? I'm using the emulator for testing purposes |
@mr-bjerre I am not sure I follow. I don't expect the emulator to require any changes. The Async changes are part of grpcio and the firestore client. The API surface hasn't been altered. |
@crwilcox not sure I understand what that means exactly? Have you seen my code example above? I'm getting exceptions when using the AsyncClient in combination with the firestore emulator. You don't? |
@mr-bjerre I think my confusion is that you are raising a new issue, not about the addition of an async interface. I created a separate tracking issue. As the only part of this issue that remains is watch clients, and that is spun off as #131 I am closing this issue. |
No description provided.
The text was updated successfully, but these errors were encountered: