-
Notifications
You must be signed in to change notification settings - Fork 28
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
Feature Request: Async Support for API Client(s) #132
Comments
Greetings! There are no plans for this yet, but this is interesting and has me thinking of the requirements and scope of such an undertaking. Given the similarities between the underlying client libraries, superficially, a lift-and-replace might not be too many changes. It would be great to hear more about what the goals and requirements are, i.e. the desired outcomes of such a refactor and how one would/could ultimately use it. What isn't clear to me yet is what asynchronous usage of the new API client would look like, as distinct from how it is used currently. This might help us figure out what additional changes would be needed in each feature of the API client to make them usable in asynchronous applications. For instance, how would It wouldn't be a dealbreaker to me if it results in the client needing an overhaul or deep class hierarchy refactor for backwards compatibility. I've been mulling over the idea of negotiating with PyPI to rename the module to Super late edit: because I keep losing the link to the request and I thought this was as good a place to put it as any: |
Glad to hear there’s interest in exploring async! My experience transitioning a project to httpx, despite minor differences like its default redirect behavior, was quite smooth. Requirements in my opinion could probably be the various rest (get / put / post etc) methods having async variants and potentially the find / iter_all methods. My primary use case for async would be with the Specifically, using an async generator for Any method making network calls would need to be async to prevent blocking. HTTPX also features connection pooling, which could be beneficial here. I’m open to assisting with this transition, especially with APISession and related areas. |
I've been working on a lift-and-shift to httpx as a side project but have run into quite a few difficulties/incompatibilities with the new interface. I might try to tackle this again after we move to the new project name. |
(New issue in new project: PagerDuty/python-pagerduty#33) |
Howdy! Apologies if this doesn't adhere to community guidelines, I didn't see anything about submitting questions / issues.
I'm a frequent user of this SDK and appreciate the work put into it. I recently faced a challenge while trying to use the PagerDuty API with asynchronous Python. Since the current implementation relies on the
requests
library, it doesn't support async operations out of the box.I'm aware that transitioning to async isn't a minor task, especially considering the need to maintain compatibility with existing sync functionalities. However, libraries like httpx could be a potential solution, offering strong compatibility with
requests
and support for both sync and async operations.Are there any plans or roadmap items to introduce async support for the API clients? Adding this feature would greatly enhance the utility of the library for async applications.
If this is something the maintainers are considering, I'd be willing to contribute to the development of this feature.
Thanks for your time and consideration!
The text was updated successfully, but these errors were encountered: