discogs_client package

discogs_client.client module

class discogs_client.client.Client(user_agent, consumer_key=None, consumer_secret=None, token=None, secret=None, user_token=None)

Bases: object

An interface to the Discogs API.

_base_url = 'https://api.discogs.com'
_request_token_url = 'https://api.discogs.com/oauth/request_token'
_authorize_url = 'https://www.discogs.com/oauth/authorize'
_access_token_url = 'https://api.discogs.com/oauth/access_token'
set_consumer_key(consumer_key, consumer_secret)
set_token(token, secret)
get_authorize_url(callback_url=None)

Returns a tuple of (<access_token>, <access_secret>, <authorize_url>). Send a Discogs user to the authorize URL to get the verifier for the access token.

get_access_token(verifier)

Uses the verifier to exchange a request token for an access token.

_check_user_agent()
_request(method, url, data=None)
_get(url)
_delete(url)
_post(url, data)
_patch(url, data)
_put(url, data)
search(*query, **fields)

Search the Discogs database. Returns a paginated list of objects (Artists, Releases, Masters, and Labels). The keyword arguments to this function are serialized into the request’s query string.

artist(id)

Fetch an Artist by ID.

release(id)

Fetch a Release by ID.

master(id)

Fetch a Master by ID.

label(id)

Fetch a Label by ID.

list(id)

Fetch a List by ID.

user(username)

Fetch a User by username.

listing(id)

Fetch a Marketplace Listing by ID.

order(id)

Fetch an Order by ID.

fee_for(price, currency='USD')

Calculate the fee for selling an item on the Marketplace.

identity()

Return a User object representing the OAuth-authorized user.

property backoff_enabled: bool

discogs_client.exceptions module

exception discogs_client.exceptions.DiscogsAPIError

Bases: Exception

Root Exception class for Discogs API errors.

exception discogs_client.exceptions.TooManyAttemptsError

Bases: DiscogsAPIError

Exception class for when the ratelimit for the API is hit too many times consecutively and backing off has not helped.

exception discogs_client.exceptions.ConfigurationError(msg)

Bases: DiscogsAPIError

Exception class for problems with the configuration of this client.

exception discogs_client.exceptions.HTTPError(message, code)

Bases: DiscogsAPIError

Exception class for HTTP errors.

exception discogs_client.exceptions.AuthorizationError(message, code, response)

Bases: HTTPError

The server rejected the client’s credentials.

discogs_client.fetchers module

class discogs_client.fetchers.Fetcher

Bases: object

Base class for Fetchers, which wrap and normalize the APIs of various HTTP libraries.

(It’s a slightly leaky abstraction designed to make testing easier.)

backoff_enabled = True
fetch(client, method, url, data=None, headers=None, json=True)

Fetch the given request

Parameters
  • client (object) – Instantiated discogs_client.client.Client object.

  • method (str) – HTTP method.

  • url (str) – API endpoint URL.

  • data (dict, optional) – data to be sent in the request’s body, by default None.

  • headers (dict, optional) – HTTP headers, by default None.

  • json_format (bool, optional) – If True, an object passed with the “data” arg will be converted into a JSON string, by default True.

Returns

  • content (bytes) – as returned by Python “Requests”

  • status_code (int) – as returned by Python “Requests”

Raises

NotImplementedError – Is raised if a child class doesn’t implement a fetch method.

request(method, url, data, headers, params=None)
class discogs_client.fetchers.LoggingDelegator(fetcher)

Bases: object

Wraps a fetcher and logs all requests.

property last_request
fetch(client, method, url, data=None, headers=None, json=True)

Appends passed “fetcher” to a requests list and returns result of fetcher.fetch method

class discogs_client.fetchers.RequestsFetcher

Bases: Fetcher

Fetches via HTTP from the Discogs API (unauthenticated)

fetch(client, method, url, data=None, headers=None, json=True)
Parameters
  • client (object) – Unused in this subclass.

  • method (str) – HTTP method.

  • url (str) – API endpoint URL.

  • data (dict, optional) – data to be sent in the request’s body, by default None.

  • headers (dict, optional) – HTTP headers, by default None.

  • json_format (bool, optional) – Unused in this subclass, by default True.

Returns

  • content (bytes) – as returned by Python “Requests”

  • status_code (int) – as returned by Python “Requests”

class discogs_client.fetchers.UserTokenRequestsFetcher(user_token)

Bases: Fetcher

Fetches via HTTP from the Discogs API using User-token authentication

fetch(client, method, url, data=None, headers=None, json_format=True)

Fetch the given request on the user’s behalf

Parameters
  • client (object) – Unused in this subclass.

  • method (str) – HTTP method.

  • url (str) – API endpoint URL.

  • data (dict, optional) – data to be sent in the request’s body, by default None.

  • headers (dict, optional) – HTTP headers, by default None.

  • json_format (bool, optional) – If True, an object passed with the “data” arg will be converted into a JSON string, by default True.

Returns

  • content (bytes) – as returned by Python “Requests”

  • status_code (int) – as returned by Python “Requests”

class discogs_client.fetchers.OAuth2Fetcher(consumer_key, consumer_secret, token=None, secret=None)

Bases: Fetcher

Fetches via HTTP + OAuth 1.0a from the Discogs API.

store_token_from_qs(query_string)
forget_token()
store_token(token, secret)
set_verifier(verifier)
fetch(client, method, url, data=None, headers=None, json_format=True)

Fetch the given request on the user’s behalf

Parameters
  • client (object) – Unused in this subclass.

  • method (str) – HTTP method.

  • url (str) – API endpoint URL.

  • data (dict, optional) – Data to be sent in the request’s body, by default None.

  • headers (dict, optional) – HTTP headers, by default None.

  • json_format (bool, optional) – If True, an object passed with the “data” arg will be converted into a JSON string, by default True.

Returns

  • content (bytes) – as returned by Python “Requests”

  • status_code (int) – as returned by Python “Requests”

class discogs_client.fetchers.FilesystemFetcher(base_path)

Bases: Fetcher

Fetches from a directory of files.

default_response = ('{"message": "Resource not found."}', 404)
path_with_params = re.compile('(?P<dir>(\\w+/)+)(?P<query>\\w+)\\?(?P<params>.*)')
fetch(client, method, url, data=None, headers=None, json=True)

Fetch the given request

Parameters
  • client (object) – Instantiated discogs_client.client.Client object.

  • method (str) – Unused in this subclass (this fetcher supports GET only).

  • url (str) – API endpoint URL.

  • data (dict, optional) – Unused in this subclass (this fetcher supports GET only).

  • headers (dict, optional) – Unused in this subclass.

  • json_format (bool, optional) –

Returns

  • content (bytes)

  • status_code (int)

check_alternate_params(base_name, json)

parse_qs() result is non-deterministic - a different file might be requested, making the tests fail randomly, depending on the order of parameters in the query. This fixes it by checking for matching file names with a different permutations of the parameters.

class discogs_client.fetchers.MemoryFetcher(responses)

Bases: Fetcher

Fetches from a dict of URL -> (content, status_code).

default_response = ('{"message": "Resource not found."}', 404)
fetch(client, method, url, data=None, headers=None, json=True)

Fetch the given request

Parameters
  • client (object) – Unused in this subclass.

  • method (str) – Unused in this subclass (this fetcher supports GET only).

  • url (str) – API endpoint URL.

  • data (dict, optional) – Unused in this subclass (this fetcher supports GET only).

  • headers (dict, optional) – Unused in this subclass.

  • json_format (bool, optional) – Unused in this subclass

Returns

  • content (bytes)

  • status_code (int)

discogs_client.models module

class discogs_client.models.SimpleFieldDescriptor(name, writable=False, transform=None)

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

class discogs_client.models.ObjectFieldDescriptor(name, class_name, optional=False, as_id=False)

An attribute that determines its value using the object’s fetch() method, and passes the resulting value through an APIObject.

If optional = True, the value will be None (rather than an APIObject instance) if the key is missing from the response.

If as_id = True, the value is treated as an ID for the new APIObject rather than a partial dict of the APIObject.

Shorthand for:

@property def baz(self):

return BazClass(self.client, self.fetch(‘baz’))

class discogs_client.models.ListFieldDescriptor(name, class_name)

An attribute that determines its value using the object’s fetch() method, and passes each item in the resulting list through an APIObject.

Shorthand for:

@property def bar(self):

return [BarClass(self.client, d) for d in self.fetch(‘bar’, [])]

class discogs_client.models.ObjectCollectionDescriptor(name, class_name, url_key=None, list_class=None)

An attribute that determines its value by fetching a URL to a paginated list of related objects, and passes each item in the resulting list through an APIObject.

Shorthand for:

@property def frozzes(self):

return PaginatedList(self.client, self.fetch(‘frozzes_url’), ‘frozzes’, FrozClass)

class discogs_client.models.Field(*args, **kwargs)

A placeholder for a descriptor. Is transformed into a descriptor by the APIObjectMeta metaclass when the APIObject classes are created.

_descriptor_class = None
to_descriptor(attr_name)
class discogs_client.models.SimpleField(*args, **kwargs)

A field that just returns the value of a given JSON key.

_descriptor_class

alias of SimpleFieldDescriptor

class discogs_client.models.ListField(*args, **kwargs)

A field that returns a list of APIObjects.

_descriptor_class

alias of ListFieldDescriptor

class discogs_client.models.ObjectField(*args, **kwargs)

A field that returns a single APIObject.

_descriptor_class

alias of ObjectFieldDescriptor

class discogs_client.models.ObjectCollection(*args, **kwargs)

A field that returns a paginated list of APIObjects.

_descriptor_class

alias of ObjectCollectionDescriptor

class discogs_client.models.APIObjectMeta(name, bases, namespace)
class discogs_client.models.APIObject
class discogs_client.models.PrimaryAPIObject(client, dict_)

A first-order API object that has a canonical endpoint of its own.

refresh()
save()
delete()
fetch(key, default=None)
class discogs_client.models.SecondaryAPIObject(client, dict_)

An object that wraps parts of a response and doesn’t have its own endpoint.

fetch(key, default=None)
class discogs_client.models.BasePaginatedResponse(client, url)

Base class for lists of objects spread across many URLs.

property per_page
_invalidate()
_load_pagination_info()
_url_for_page(page)
sort(key, order='asc')
filter(**kwargs)
property pages
property count
page(index)
_transform(item)
class discogs_client.models.PaginatedList(client, url, key, class_)

A paginated list of objects of a particular class.

_transform(item)
class discogs_client.models.Wantlist(client, url, key, class_)
add(release, notes=None, notes_public=None, rating=None)
remove(release)
class discogs_client.models.Inventory(client, url, key, class_)
add_listing(release, condition, price, status, sleeve_condition=None, comments=None, allow_offers=None, external_id=None, location=None, weight=None, format_quantity=None)
class discogs_client.models.OrderMessagesList(client, url, key, class_)
add(message=None, status=None, email_buyer=True, email_seller=False)
class discogs_client.models.MixedPaginatedList(client, url, key)

A paginated list of objects identified by their type parameter.

_transform(item)
class discogs_client.models.Artist(client, dict_)
id

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

name

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

real_name

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

images

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

profile

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

data_quality

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

name_variations

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

url

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

urls

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

aliases

An attribute that determines its value using the object’s fetch() method, and passes each item in the resulting list through an APIObject.

Shorthand for:

@property def bar(self):

return [BarClass(self.client, d) for d in self.fetch(‘bar’, [])]

members

An attribute that determines its value using the object’s fetch() method, and passes each item in the resulting list through an APIObject.

Shorthand for:

@property def bar(self):

return [BarClass(self.client, d) for d in self.fetch(‘bar’, [])]

groups

An attribute that determines its value using the object’s fetch() method, and passes each item in the resulting list through an APIObject.

Shorthand for:

@property def bar(self):

return [BarClass(self.client, d) for d in self.fetch(‘bar’, [])]

property releases
class discogs_client.models.Release(client, dict_)
id

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

title

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

year

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

thumb

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

data_quality

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

status

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

genres

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

images

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

country

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

notes

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

formats

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

styles

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

url

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

videos

An attribute that determines its value using the object’s fetch() method, and passes each item in the resulting list through an APIObject.

Shorthand for:

@property def bar(self):

return [BarClass(self.client, d) for d in self.fetch(‘bar’, [])]

tracklist

An attribute that determines its value using the object’s fetch() method, and passes each item in the resulting list through an APIObject.

Shorthand for:

@property def bar(self):

return [BarClass(self.client, d) for d in self.fetch(‘bar’, [])]

artists

An attribute that determines its value using the object’s fetch() method, and passes each item in the resulting list through an APIObject.

Shorthand for:

@property def bar(self):

return [BarClass(self.client, d) for d in self.fetch(‘bar’, [])]

credits

An attribute that determines its value using the object’s fetch() method, and passes each item in the resulting list through an APIObject.

Shorthand for:

@property def bar(self):

return [BarClass(self.client, d) for d in self.fetch(‘bar’, [])]

labels

An attribute that determines its value using the object’s fetch() method, and passes each item in the resulting list through an APIObject.

Shorthand for:

@property def bar(self):

return [BarClass(self.client, d) for d in self.fetch(‘bar’, [])]

companies

An attribute that determines its value using the object’s fetch() method, and passes each item in the resulting list through an APIObject.

Shorthand for:

@property def bar(self):

return [BarClass(self.client, d) for d in self.fetch(‘bar’, [])]

property master
property marketplace_stats
property price_suggestions
class discogs_client.models.MarketplaceStats(client, dict_)
num_for_sale

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

blocked_from_sale

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

lowest_price

An attribute that determines its value using the object’s fetch() method, and passes the resulting value through an APIObject.

If optional = True, the value will be None (rather than an APIObject instance) if the key is missing from the response.

If as_id = True, the value is treated as an ID for the new APIObject rather than a partial dict of the APIObject.

Shorthand for:

@property def baz(self):

return BazClass(self.client, self.fetch(‘baz’))

class discogs_client.models.PriceSuggestions(client, dict_)
very_good

An attribute that determines its value using the object’s fetch() method, and passes the resulting value through an APIObject.

If optional = True, the value will be None (rather than an APIObject instance) if the key is missing from the response.

If as_id = True, the value is treated as an ID for the new APIObject rather than a partial dict of the APIObject.

Shorthand for:

@property def baz(self):

return BazClass(self.client, self.fetch(‘baz’))

good_plus

An attribute that determines its value using the object’s fetch() method, and passes the resulting value through an APIObject.

If optional = True, the value will be None (rather than an APIObject instance) if the key is missing from the response.

If as_id = True, the value is treated as an ID for the new APIObject rather than a partial dict of the APIObject.

Shorthand for:

@property def baz(self):

return BazClass(self.client, self.fetch(‘baz’))

near_mint

An attribute that determines its value using the object’s fetch() method, and passes the resulting value through an APIObject.

If optional = True, the value will be None (rather than an APIObject instance) if the key is missing from the response.

If as_id = True, the value is treated as an ID for the new APIObject rather than a partial dict of the APIObject.

Shorthand for:

@property def baz(self):

return BazClass(self.client, self.fetch(‘baz’))

good

An attribute that determines its value using the object’s fetch() method, and passes the resulting value through an APIObject.

If optional = True, the value will be None (rather than an APIObject instance) if the key is missing from the response.

If as_id = True, the value is treated as an ID for the new APIObject rather than a partial dict of the APIObject.

Shorthand for:

@property def baz(self):

return BazClass(self.client, self.fetch(‘baz’))

very_good_plus

An attribute that determines its value using the object’s fetch() method, and passes the resulting value through an APIObject.

If optional = True, the value will be None (rather than an APIObject instance) if the key is missing from the response.

If as_id = True, the value is treated as an ID for the new APIObject rather than a partial dict of the APIObject.

Shorthand for:

@property def baz(self):

return BazClass(self.client, self.fetch(‘baz’))

mint

An attribute that determines its value using the object’s fetch() method, and passes the resulting value through an APIObject.

If optional = True, the value will be None (rather than an APIObject instance) if the key is missing from the response.

If as_id = True, the value is treated as an ID for the new APIObject rather than a partial dict of the APIObject.

Shorthand for:

@property def baz(self):

return BazClass(self.client, self.fetch(‘baz’))

fair

An attribute that determines its value using the object’s fetch() method, and passes the resulting value through an APIObject.

If optional = True, the value will be None (rather than an APIObject instance) if the key is missing from the response.

If as_id = True, the value is treated as an ID for the new APIObject rather than a partial dict of the APIObject.

Shorthand for:

@property def baz(self):

return BazClass(self.client, self.fetch(‘baz’))

poor

An attribute that determines its value using the object’s fetch() method, and passes the resulting value through an APIObject.

If optional = True, the value will be None (rather than an APIObject instance) if the key is missing from the response.

If as_id = True, the value is treated as an ID for the new APIObject rather than a partial dict of the APIObject.

Shorthand for:

@property def baz(self):

return BazClass(self.client, self.fetch(‘baz’))

class discogs_client.models.Master(client, dict_)
id

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

title

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

data_quality

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

styles

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

year

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

genres

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

images

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

url

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

videos

An attribute that determines its value using the object’s fetch() method, and passes each item in the resulting list through an APIObject.

Shorthand for:

@property def bar(self):

return [BarClass(self.client, d) for d in self.fetch(‘bar’, [])]

tracklist

An attribute that determines its value using the object’s fetch() method, and passes each item in the resulting list through an APIObject.

Shorthand for:

@property def bar(self):

return [BarClass(self.client, d) for d in self.fetch(‘bar’, [])]

main_release

An attribute that determines its value using the object’s fetch() method, and passes the resulting value through an APIObject.

If optional = True, the value will be None (rather than an APIObject instance) if the key is missing from the response.

If as_id = True, the value is treated as an ID for the new APIObject rather than a partial dict of the APIObject.

Shorthand for:

@property def baz(self):

return BazClass(self.client, self.fetch(‘baz’))

versions

An attribute that determines its value by fetching a URL to a paginated list of related objects, and passes each item in the resulting list through an APIObject.

Shorthand for:

@property def frozzes(self):

return PaginatedList(self.client, self.fetch(‘frozzes_url’), ‘frozzes’, FrozClass)

class discogs_client.models.Label(client, dict_)
id

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

name

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

profile

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

urls

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

images

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

contact_info

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

data_quality

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

url

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

sublabels

An attribute that determines its value using the object’s fetch() method, and passes each item in the resulting list through an APIObject.

Shorthand for:

@property def bar(self):

return [BarClass(self.client, d) for d in self.fetch(‘bar’, [])]

parent_label

An attribute that determines its value using the object’s fetch() method, and passes the resulting value through an APIObject.

If optional = True, the value will be None (rather than an APIObject instance) if the key is missing from the response.

If as_id = True, the value is treated as an ID for the new APIObject rather than a partial dict of the APIObject.

Shorthand for:

@property def baz(self):

return BazClass(self.client, self.fetch(‘baz’))

releases

An attribute that determines its value by fetching a URL to a paginated list of related objects, and passes each item in the resulting list through an APIObject.

Shorthand for:

@property def frozzes(self):

return PaginatedList(self.client, self.fetch(‘frozzes_url’), ‘frozzes’, FrozClass)

class discogs_client.models.User(client, dict_)
id

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

username

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

releases_contributed

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

num_collection

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

num_wantlist

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

num_lists

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

rank

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

rating_avg

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

url

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

name

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

profile

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

location

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

home_page

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

registered

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

inventory

An attribute that determines its value by fetching a URL to a paginated list of related objects, and passes each item in the resulting list through an APIObject.

Shorthand for:

@property def frozzes(self):

return PaginatedList(self.client, self.fetch(‘frozzes_url’), ‘frozzes’, FrozClass)

wantlist

An attribute that determines its value by fetching a URL to a paginated list of related objects, and passes each item in the resulting list through an APIObject.

Shorthand for:

@property def frozzes(self):

return PaginatedList(self.client, self.fetch(‘frozzes_url’), ‘frozzes’, FrozClass)

property orders
property lists
property collection_folders
collection_items(release)

Fetch collection items by release, accepts Release object or release id

Parameters

release (Release or int) –

Returns

PaginatedList of CollectionItemInstance objects

Return type

PaginatedList

property collection_value
class discogs_client.models.WantlistItem(client, dict_)
id

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

rating

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

notes

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

notes_public

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

release

An attribute that determines its value using the object’s fetch() method, and passes the resulting value through an APIObject.

If optional = True, the value will be None (rather than an APIObject instance) if the key is missing from the response.

If as_id = True, the value is treated as an ID for the new APIObject rather than a partial dict of the APIObject.

Shorthand for:

@property def baz(self):

return BazClass(self.client, self.fetch(‘baz’))

class discogs_client.models.CollectionItemInstance(client, dict_)
id

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

instance_id

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

rating

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

folder_id

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

notes

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

date_added

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

release

An attribute that determines its value using the object’s fetch() method, and passes the resulting value through an APIObject.

If optional = True, the value will be None (rather than an APIObject instance) if the key is missing from the response.

If as_id = True, the value is treated as an ID for the new APIObject rather than a partial dict of the APIObject.

Shorthand for:

@property def baz(self):

return BazClass(self.client, self.fetch(‘baz’))

class discogs_client.models.CollectionValue(client, dict_)
maximum

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

median

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

minimum

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

class discogs_client.models.CollectionFolder(client, dict_)
id

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

name

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

count

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

property releases
add_release(release)
remove_release(instance)
class discogs_client.models.List(client, dict_)
id

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

name

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

description

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

public

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

url

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

date_changed

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

date_added

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

items

An attribute that determines its value using the object’s fetch() method, and passes each item in the resulting list through an APIObject.

Shorthand for:

@property def bar(self):

return [BarClass(self.client, d) for d in self.fetch(‘bar’, [])]

class discogs_client.models.Listing(client, dict_)
id

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

status

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

allow_offers

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

condition

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

sleeve_condition

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

ships_from

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

comments

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

audio

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

url

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

release

An attribute that determines its value using the object’s fetch() method, and passes the resulting value through an APIObject.

If optional = True, the value will be None (rather than an APIObject instance) if the key is missing from the response.

If as_id = True, the value is treated as an ID for the new APIObject rather than a partial dict of the APIObject.

Shorthand for:

@property def baz(self):

return BazClass(self.client, self.fetch(‘baz’))

seller

An attribute that determines its value using the object’s fetch() method, and passes the resulting value through an APIObject.

If optional = True, the value will be None (rather than an APIObject instance) if the key is missing from the response.

If as_id = True, the value is treated as an ID for the new APIObject rather than a partial dict of the APIObject.

Shorthand for:

@property def baz(self):

return BazClass(self.client, self.fetch(‘baz’))

posted

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

weight

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

location

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

format_quantity

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

external_id

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

property price
class discogs_client.models.Order(client, dict_)
id

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

next_status

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

shipping_address

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

additional_instructions

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

url

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

status

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

fee

An attribute that determines its value using the object’s fetch() method, and passes the resulting value through an APIObject.

If optional = True, the value will be None (rather than an APIObject instance) if the key is missing from the response.

If as_id = True, the value is treated as an ID for the new APIObject rather than a partial dict of the APIObject.

Shorthand for:

@property def baz(self):

return BazClass(self.client, self.fetch(‘baz’))

buyer

An attribute that determines its value using the object’s fetch() method, and passes the resulting value through an APIObject.

If optional = True, the value will be None (rather than an APIObject instance) if the key is missing from the response.

If as_id = True, the value is treated as an ID for the new APIObject rather than a partial dict of the APIObject.

Shorthand for:

@property def baz(self):

return BazClass(self.client, self.fetch(‘baz’))

seller

An attribute that determines its value using the object’s fetch() method, and passes the resulting value through an APIObject.

If optional = True, the value will be None (rather than an APIObject instance) if the key is missing from the response.

If as_id = True, the value is treated as an ID for the new APIObject rather than a partial dict of the APIObject.

Shorthand for:

@property def baz(self):

return BazClass(self.client, self.fetch(‘baz’))

created

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

last_activity

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

messages

An attribute that determines its value by fetching a URL to a paginated list of related objects, and passes each item in the resulting list through an APIObject.

Shorthand for:

@property def frozzes(self):

return PaginatedList(self.client, self.fetch(‘frozzes_url’), ‘frozzes’, FrozClass)

items

An attribute that determines its value using the object’s fetch() method, and passes each item in the resulting list through an APIObject.

Shorthand for:

@property def bar(self):

return [BarClass(self.client, d) for d in self.fetch(‘bar’, [])]

property shipping
class discogs_client.models.OrderMessage(client, dict_)
subject

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

message

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

to

An attribute that determines its value using the object’s fetch() method, and passes the resulting value through an APIObject.

If optional = True, the value will be None (rather than an APIObject instance) if the key is missing from the response.

If as_id = True, the value is treated as an ID for the new APIObject rather than a partial dict of the APIObject.

Shorthand for:

@property def baz(self):

return BazClass(self.client, self.fetch(‘baz’))

order

An attribute that determines its value using the object’s fetch() method, and passes the resulting value through an APIObject.

If optional = True, the value will be None (rather than an APIObject instance) if the key is missing from the response.

If as_id = True, the value is treated as an ID for the new APIObject rather than a partial dict of the APIObject.

Shorthand for:

@property def baz(self):

return BazClass(self.client, self.fetch(‘baz’))

timestamp

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

class discogs_client.models.Track(client, dict_)
duration

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

position

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

title

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

artists

An attribute that determines its value using the object’s fetch() method, and passes each item in the resulting list through an APIObject.

Shorthand for:

@property def bar(self):

return [BarClass(self.client, d) for d in self.fetch(‘bar’, [])]

credits

An attribute that determines its value using the object’s fetch() method, and passes each item in the resulting list through an APIObject.

Shorthand for:

@property def bar(self):

return [BarClass(self.client, d) for d in self.fetch(‘bar’, [])]

class discogs_client.models.Price(client, dict_)
currency

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

value

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

class discogs_client.models.Video(client, dict_)
duration

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

embed

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

title

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

description

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

url

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

class discogs_client.models.ListItem(client, dict_)
id

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

comment

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

display_title

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

type

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

image_url

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

url

An attribute that determines its value using the object’s fetch() method.

If transform is a callable, the value will be passed through transform when read. Useful for strings that should be ints, parsing timestamps, etc.

Shorthand for:

@property def foo(self):

return self.fetch(‘foo’)

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)

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'
class discogs_client.utils.Status(value)

Bases: Enum

Status for a listing

FOR_SALE = 'For Sale'
DRAFT = 'Draft'
EXPIRED = 'Expired'
class discogs_client.utils.Sort(value)

Bases: Enum

An enumeration.

By = <enum 'By'>
Order = <enum 'Order'>