discogs_client.utils module#
- discogs_client.utils.parse_timestamp(timestamp: str) datetime #
Convert an ISO 8601 timestamp into a datetime.
- discogs_client.utils.update_qs(url, params)#
A not-very-intelligent function to glom parameters onto a query string.
- discogs_client.utils.omit_none(dict_)#
Removes any key from a dict that has a value of None.
- discogs_client.utils.jitter(delay: int) float #
- discogs_client.utils.get_backoff_duration(exponent: int) float #
- discogs_client.utils.backoff(f)#
Wraps the request method of the Fetcher class to provide exponential backoff if rate limit is hit.
- class discogs_client.utils.Condition(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)#
Bases:
Enum
Conditions for media and sleeve
- MINT = 'Mint (M)'#
- NEAR_MINT = 'Near Mint (NM or M-)'#
- VERY_GOOD_PLUS = 'Very Good Plus (VG+)'#
- VERY_GOOD = 'Very Good (VG)'#
- GOOD_PLUS = 'Good Plus (G+)'#
- GOOD = 'Good (G)'#
- FAIR = 'Fair (F)'#
- POOR = 'Poor (P)'#
- GENERIC = 'Generic'#
- NOT_GRADED = 'Not Graded'#
- NO_COVER = 'No Cover'#