Skip to content

v0.3.0

Choose a tag to compare

@salimhamed salimhamed released this 08 Nov 19:42
· 17 commits to main since this release

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 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.
    # 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 to make HTTP requests. In this release, we've switched to 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 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

Chore

  • chore: Add Rate Limit section to the docs (#86) (78b028a)