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 `AsyncClient` that can be used in `async/await` coroutines.
* 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 `ClientSync` or `ClientAsync`. Importing `Client` (which is an alias for `ClientSync`) will be deprecated in a future release.
python
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 [`requests`](https://github.com/psf/requests) to make HTTP requests. In this release, we've switched to [`HTTPX`](https://github.com/encode/httpx/) to make HTTP requests because `HTTPX` provides 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](https://jungle-scout-junglescout-python-client.readthedocs-hosted.com/en/latest/api.html#exceptions) for more information on the project specific Exceptions.
* Previously, we were using default timeout settings of `default_connect_timeout=4 seconds` and `default_read_timeout=10 seconds`. Now, the default timeout is an overall timeout of `60 seconds`.
Individual PRs
Feature
* feat: Add AsyncClient, Introduce Project-Specific Exceptions, and Ability to Close Clients (87)
* Co-authored-by: NotAnyMike <MikeWoodcockCgmail.com> ([`9d74862`](https://github.com/Junglescout/junglescout-python-client/commit/9d74862eb5a114e79f66ab4f572ceaac04862634))
Chore
* chore: Add Rate Limit section to the docs (86) ([`78b028a`](https://github.com/Junglescout/junglescout-python-client/commit/78b028a5b23fa65515d773e6ef481603e9e67b6a))