Repository navigation
v0.3.0
v0.3.0 (2024-11-08)
Summary
This release includes new features, most notably a new AsyncClient client that can be used with async/await coroutines. Here's a summary of all the new features included in this release:
- Added a new
AsyncClientthat can be used inasync/awaitcoroutines. - More direct interface to explicitly close clients.
- Ability to use ClientSync and ClientAsync as context managers, to automatically close clients when exiting the context.
- Introduced project-specific Exceptions.
- Various bug fixes.
Breaking Changes
- The import path for clients has changed. Additionally, we're recommending to import either
ClientSyncorClientAsync. ImportingClient(which is an alias forClientSync) will be deprecated in a future release.# This import no longer works from junglescout.client import Client # Instead, you should import clients from the top-level package from junglescout import ClientSync, ClientAsync # You're still able to import the `Client` from the top-level package (which is an alias for `ClientSync`) # However, in future releases, we plan to drop support for the `Client` alias from junglescout import Client
- Under the hood, the Jungle Scout Python Client was previously using
requeststo make HTTP requests. In this release, we've switched toHTTPXto make HTTP requests becauseHTTPXprovides async support by default. In most cases this change should be transparent. - Client methods that make API requests now raise project-specific Exceptions. Previously, client methods would raise
requests.HTTPError. See the documentation for more information on the project specific Exceptions. - Previously, we were using default timeout settings of
default_connect_timeout=4 secondsanddefault_read_timeout=10 seconds. Now, the default timeout is an overall timeout of60 seconds.
Individual PRs
Feature
- feat: Add AsyncClient, Introduce Project-Specific Exceptions, and Ability to Close Clients (#87)
- Co-authored-by: NotAnyMike <MikeWoodcockC@gmail.com> (
9d74862)
- Co-authored-by: NotAnyMike <MikeWoodcockC@gmail.com> (