Core.rq_database is a collection of function wrappers around the Discogs api for database interactions.

Release

A release represents a particular physical or digital object released by one or more Artists.

get_release[source]

get_release(user:Union[UserWithoutAuthentication, UserWithUserTokenBasedAuthentication], release_id:int, curr_abbr:Optional[CurrAbbr]=None)

Get information about a particular release from the Discogs database.

No user Authentication needed.

Parameters:

user: user object (required)

release_id : number (required) -> The Release ID.

curr_abbr: string (optional) -> Currency for marketplace data. Defaults to the authenticated users currency.

# Example for usage of get_releases
get_release(user=example_user, 
            release_id=6067651, 
            curr_abbr=CurrAbbr.EUR)
<Response [200]>

get_user_release_rating[source]

get_user_release_rating(user:Union[UserWithoutAuthentication, UserWithUserTokenBasedAuthentication], release_id:int, username:str)

Get the rating of a release made by the given user.

No user Authentication needed.

Parameters:

user: user object (required)

release_id : number (required) -> The Release ID.

username: string (required) -> The username of the rating you are trying to request.

# Example for usage of get_user_release_rating
get_user_release_rating(user=example_user, 
                        release_id=9453891, 
                        username="darkwolf")
<Response [200]>

update_user_release_rating[source]

update_user_release_rating(user:UserWithUserTokenBasedAuthentication, release_id:int, username:str, rating:int)

Update the rating of a release made by the given user. If there is no rating, it will create one.

User Authentication needed.

Parameters:

user: user object (required)

release_id : number (required) -> The Release ID.

username: string (required) -> The username of the rating you are trying to request.

rating: int (required) -> The new rating value. Must be a value between 1 and 5.

# Example for usage of update_user_release_rating

update_user_release_rating(user=example_user, 
                           release_id=10361797,
                           username="discogspy", 
                           rating=5)
<Response [201]>

delete_user_release_rating[source]

delete_user_release_rating(user:UserWithUserTokenBasedAuthentication, release_id:int, username:str)

Delete the rating of a release made by the given user.

User Authentication needed.

Parameters:

user: user object (required)

release_id : number (required) -> The Release ID.

username: string (required) -> The username of the rating you are trying to delete.

# Example for usage of delete_user_release_rating

delete_user_release_rating(user=example_user, 
                           release_id=10361797, 
                           username="discogspy")
<Response [204]>

get_community_release_rating[source]

get_community_release_rating(user:Union[UserWithoutAuthentication, UserWithUserTokenBasedAuthentication], release_id:int)

Get the rating of a release made by the community. A community release rating includes the average rating and the total number of user ratings for a given release.

This function doesn't work for master releases!

No user Authentication needed.

Parameters:

user: user object (required)

release_id : number (required) -> The Release ID.

# Example for usage of get_community_release_rating

get_community_release_rating(user=example_user, 
                             release_id=1995816)
<Response [200]>

Master Release

A Master release represents a set of similar Releases. Masters releases have a “main release” which is often the chronologically earliest.

get_master_release[source]

get_master_release(user:Union[UserWithoutAuthentication, UserWithUserTokenBasedAuthentication], master_id:int)

Get information to a particular master release from Discogs database.

No user Authentication needed.

Parameters:

user: user object (required)

master_id : number (required) -> The Master ID.

# Example for usage of get_master_release

get_master_release(user=example_user, 
                   master_id=195663)
<Response [200]>

get_releases_related_to_master_release(user:Union[UserWithoutAuthentication, UserWithUserTokenBasedAuthentication], master_id:int, page:Optional[int]=None, per_page:Optional[int]=None, release_format:Optional[str]=None, label:Optional[str]=None, released:Optional[str]=None, country:Optional[str]=None, sort:Optional[SortOptionsMaster]=None, sort_order:Optional[SortOrder]=None)

Get a list of all Releases that are versions of the given master release.

No user Authentication needed.

Parameters:

user: user object (required)

master_id : number (required) -> The Master ID.

page: number (optional) -> The page you want to request.

per_page: number (optional) -> The number of items per page.

release_format: string (optional) -> The format to filter.

label: string (optional) -> The label to filter.

released: string (optional) -> The release year to filter.

country: string (optional) -> The country to filter.

sort: string (optional) -> Sort items by this field.

sort_order: string (optional) -> Sort items in a particular order (one of asc, desc)

# Example for usage of get_releases_related_to_master_release

get_releases_related_to_master_release(user=example_user, 
                                       master_id=57960, 
                                       page=1, 
                                       per_page=50, 
                                       release_format="CD",
                                       label="label", 
                                       released="1989",
                                       country="country", 
                                       sort=SortOptionsMaster.released,
                                       sort_order=SortOrder.asc)
<Response [200]>

Artist

An Artist represents a person in the Discogs database who contributed to a Release in some capacity.

get_artist[source]

get_artist(user:Union[UserWithoutAuthentication, UserWithUserTokenBasedAuthentication], artist_id:int)

Get information about an artist.

No user Authentication needed.

Parameters:

user: user object (required)

artist_id : number (required) -> The Artist ID.

# Example for usage of get_artist
get_artist(user=example_user, 
           artist_id=1516559)
<Response [200]>

get_artist_releases[source]

get_artist_releases(user:Union[UserWithoutAuthentication, UserWithUserTokenBasedAuthentication], artist_id:int, page:Optional[int]=None, per_page:Optional[int]=None, sort:Optional[SortOptionsArtist]=None, sort_order:Optional[SortOrder]=None)

Get a list of releases and masters associated with the given artist.

No user Authentication needed.

Parameters:

user: user object (required)

artist_id : number (required) -> The Artist ID.

page: number (optional) -> The page you want to request.

per_page: number (optional) -> The number of items per page.

sort: string (optional) -> Sort items by this field.

sort_order: string (optional) -> Sort items in a particular order (one of asc, desc)

# Example for usage of get_artist_releases
get_artist_releases(user=example_user, 
                    artist_id=1516559, 
                    page=1, 
                    per_page=3, 
                    sort=SortOptionsArtist.year, 
                    sort_order=SortOrder.desc)
<Response [200]>

Label

A label resource represents a label, company, recording studio, location, or other entity involved with artists and releases.

get_label[source]

get_label(user:Union[UserWithoutAuthentication, UserWithUserTokenBasedAuthentication], label_id:int)

Get information about a label.

No user Authentication needed.

Parameters:

user: user object (required)

label_id : number (required) -> The Label ID.

# Example for usage of get_label
get_label(user=example_user, 
          label_id=18263)
<Response [200]>

get_label_releases[source]

get_label_releases(user:Union[UserWithoutAuthentication, UserWithUserTokenBasedAuthentication], label_id:int, page:Optional[int]=None, per_page:Optional[int]=None, sort:Optional[SortOptionsLabel]=None, sort_order:Optional[SortOrder]=None)

Get a list of releases and masters associated with the given label.

No user Authentication needed.

Parameters:

user: user object (required)

label_id : number (required) -> The Label ID.

page: number (optional) -> The page you want to request.

per_page: number (optional) -> The number of items per page.

sort: string (optional) -> Sort items by this field.

sort_order: string (optional) -> Sort items in a particular order (one of asc, desc)

# Example for usage of get_label_releases
get_label_releases(user=example_user, 
                   label_id=18263, 
                   page=1, 
                   per_page=3, 
                   sort=SortOptionsLabel.year, 
                   sort_order=SortOrder.desc)
<Response [200]>