Optional Configuration

Requests rate limiting

The Discogs API has rate limitations as documented on the discogs.com API documentation pages. python3-discogs-client respects and handles these limitations automatically.

Backing off and auto retry when API rate limit is hit is enabled by default and can be disabled as follows:

>>> import discogs_client
>>> d = discogs_client.Client('ExampleApplication/0.1')
>>> d.backoff_enabled = False

Request timeouts

By default the Client does not timeout requests.

For example, to enable a request timeout of 5 seconds:

timeout_in_seconds = 5
client.set_timeout(
    connect=timeout_in_seconds,
    read=timeout_in_seconds
)

Timeouts support integer and float values, you can also set either value to None to disable timeout for connect or read separately