# Async Operations via pydgraph

**URL:** <https://discuss.dgraph.io/t/async-operations-via-pydgraph/13989>\
**Category:** Dgraph Clients\
**Tags:** kind:question, pydgraph\
**Created:** [May 3, 2021, 5:02pm UTC](https://discuss.dgraph.io/t/async-operations-via-pydgraph/13989 "2021-05-03T17:02:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dominik\_Roth](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/dominik_roth/32/8004_2.png) [@Dominik\_Roth](https://discuss.dgraph.io/u/Dominik_Roth)\
**Post date:** [May 3, 2021, 5:02pm UTC](https://discuss.dgraph.io/t/async-operations-via-pydgraph/13989/1 "2021-05-03T17:02:44Z")

</div>

Does the Python-driver (pydgraph) support async operations? (via asyncio or similar)

I originally asked your support (or whatever that icon in the bottom-right corner is), which pointed me to the ‘async methods’ portion of the python documentation (async: [https://dgraph.io/docs/clients/python/#async-methods](https://dgraph.io/docs/clients/python/#async-methods)), but this descibes how to reads a result of such an ‘async’ operation using regular synchronous python-code. I don’t want my python-thread to idle-wait for a response or to guess when the response is ready.

Is the Python-Driver capable of async operations based on the coroutines-spec outlined in PEP 492? ([PEP 492 -- Coroutines with async and await syntax | Python.org](https://www.python.org/dev/peps/pep-0492/))  
Or is there another way to perform operations on the DB using the Python-driver without having to idle-wait for a response?

---

<div class="post-metadata">

**Author:** ![Dominik\_Roth](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/dominik_roth/32/8004_2.png) [@Dominik\_Roth](https://discuss.dgraph.io/u/Dominik_Roth)\
**Post date:** [May 3, 2021, 5:23pm UTC](https://discuss.dgraph.io/t/async-operations-via-pydgraph/13989/2 "2021-05-03T17:23:56Z")

</div>

I had a look at the codebase and it seems like you are using the old synchronous operations of gRPC to communicate with the Dgraph-Server?  
I therefore guess, that integration an this pydgraph into async-code will always result in blocking the whole event-loop until a response is received…  
Are there any plans to support the new async-api of gRPC in the future?  
([[gRPC AsyncIO API — gRPC Python 1.37.0 documentation](https://grpc.github.io/grpc/python/grpc_asyncio.html)]
