Skip to content

Feature/async retry#12

Closed
kudj wants to merge 43 commits intomainfrom
feature/async-retry
Closed

Feature/async retry#12
kudj wants to merge 43 commits intomainfrom
feature/async-retry

Conversation

@kudj
Copy link
Copy Markdown
Contributor

@kudj kudj commented Mar 10, 2025

No description provided.

@kudj kudj requested review from AlbSed and Copilot March 10, 2025 14:55
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Overview

This PR introduces asynchronous HTTP client functionality along with examples, tests, and workflow updates to support the new async features. Key changes include:

  • Addition of AsyncHttpClient and its corresponding usage examples in README.md and docs/examples.
  • Inclusion of extensive tests in tests/test_async.py for async operations and retry logic.
  • Updates to workflows and dependencies (e.g., Python version upgrade to 3.12 and addition of httpx).

Reviewed Changes

File Description
README.md Added async usage instructions and code examples.
docs/examples/storage_client_async.py New async storage client example.
docs/examples/poekapi_async.py New async example for the Pokémon API (note potential typo).
docs/examples/storage_client.py Synchronous storage client example.
docs/examples/pokeapi_process_multiple.py Example demonstrating multiple async requests.
tests/test_async.py Added tests covering async HTTP client behavior and retries.
src/keboola/http_client/async_client.py Implementation of the AsyncHttpClient with retry logic.
src/keboola/http_client/http.py Minor import adjustments.
setup.py Updated dependencies and Python versions.
.github/workflows/*.yml Upgraded Python version to 3.12 in CI/CD workflows.

Copilot reviewed 15 out of 15 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

docs/examples/poekapi_async.py:1

  • The filename 'poekapi_async.py' likely contains a typo; consider renaming it to 'pokeapi_async.py' for consistency with other examples.
Filename: poekapi_async.py

Comment on lines +56 to +58
one_reqeust_per_second_amount = float(1 / max_requests_per_second)
self.limiter = AsyncLimiter(1, one_reqeust_per_second_amount)

Copy link

Copilot AI Mar 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The variable 'one_reqeust_per_second_amount' contains a spelling error; consider renaming it to 'one_request_per_second_amount'.

Suggested change
one_reqeust_per_second_amount = float(1 / max_requests_per_second)
self.limiter = AsyncLimiter(1, one_reqeust_per_second_amount)
one_request_per_second_amount = float(1 / max_requests_per_second)
self.limiter = AsyncLimiter(1, one_request_per_second_amount)

Copilot uses AI. Check for mistakes.
@kudj kudj closed this Mar 10, 2025
@kudj kudj deleted the feature/async-retry branch September 25, 2025 07:25
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

Successfully merging this pull request may close these issues.

4 participants