Skip to content
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

Add Support for Asynchronous API Calls in Example Code #180

Open
shwetd19 opened this issue Feb 9, 2025 · 0 comments
Open

Add Support for Asynchronous API Calls in Example Code #180

shwetd19 opened this issue Feb 9, 2025 · 0 comments

Comments

@shwetd19
Copy link

shwetd19 commented Feb 9, 2025

Title: Add Support for Asynchronous API Calls in Example Code

Description:
Hi there! 👋

I’ve been exploring the examples-python repository, and I think it’s a great resource for developers working with Restack. However, I noticed that most of the examples use synchronous API calls. Adding support for asynchronous API calls (using asyncio and aiohttp or httpx) could significantly improve the performance and scalability of the examples, especially for use cases involving multiple API requests or high-concurrency scenarios.

Proposed Solution:
I’d like to contribute by adding asynchronous versions of the existing examples. This would involve:

  1. Refactoring the code to use asyncio and an async HTTP library like aiohttp or httpx.
  2. Adding clear documentation on how to run and use the async examples.
  3. Ensuring backward compatibility so that the existing synchronous examples remain functional.

Benefits:

  • Improved performance for I/O-bound tasks.
  • Better alignment with modern Python practices.
  • Enhanced learning experience for developers exploring async programming.

Let me know if this is something you’d like to see in the repository! I’d be happy to work on this and submit a PR. 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant