googleapis / googleapis/google-cloud-python

(for v3) consider using anyio for the async client implementation

Open
#15,286 1 comment 0 reactions 1 assignee Claimed by @rameshdharan View on GitHub
api: bigtable
Dominant language
Python
Stars
5.4k
Forks
1.8k
Avg merge
3d 4h
Merged PRs (30d)
122

Description

Thanks for stopping by to let us know something could be better!

**PLEASE READ**: If you have a support contract with Google, please create an issue in the [support console](https://cloud.google.com/support/) instead of filing on GitHub. This will ensure a timely response.

**Is your feature request related to a problem? Please describe.**

Today, I can't use BigTable's Async client in my [Trio](https://github.com/python-trio/trio) application because the client assumes that the async runtime is asyncio.

**Describe the solution you'd like**

By using [Anyio](https://github.com/agronholm/anyio), the client implementation would support both the Trio and asyncio runtimes, allowing Trio users to use the client libraries without having to resort to using the sync library, and wrapping it in a lot of `trio.to_thread.run_sync` calls.

**Describe alternatives you've considered**

The client library could also support a trio-native implementation. However, this feels pretty burdensome for maintenance.

I believe this should be a ~straightforward change since the library seems to alias a lot of the asyncio methods. Swapping those out for anyio equivalents should do the right thing.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.