Skip to content

Add Support for Asynchronous API Calls in Example Code #180

Open
@shwetd19

Description

@shwetd19

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. 😊

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions