Skip to main content

Discogspy

Discogspy is a type-safe and easy to use python wrapper around the Discogs API.

General information


What's the use case for discogspy?


I have a small label/distro, and I sell my items via Discogs and my own website. To keep both stores in sync is tidies. That's why I want to automate this process. Therefore I need to be able to get information from my Discogs store. That can be done via the official Discogs python client. However, I also need to be able to update orders, add and remove items etc. and this doesn't seem to work via the Discogs python client. That's why I decided to wrap the Discogs API myself.


Important information:
Requests to the Discogs API are throttled by the server by source IP to 60 per minute for authenticated requests, and 25 per minute for unauthenticated requests, with some exceptions.

Install

pip install discogspy

Road Map

  1. Create type save python wrapper around the Discogs API

    a) Wrap database calls (done - except search request cause I personally dont have any use case for it)
    b) Wrap marketplace calls (done)
    c) Wrap inventory export calls (done)
    d) Wrap inventory upload calls (done)
    e) Wrap user identity calls (maybe later - I personally dont have any use case for it)
    f) Wrap user collection calls (done)
    g) Wrap user wantlist calls (done)
    h) Wrap user lists calls

  2. Create response wrapper

How to use

For a detailed explanation and more examples, please visit the documentation.

Currently, you have two options for starting requests to Discogs.

  1. Create a user object without authentication. This will limit your options cause a lot of API calls do require authentication.
from discogspy.core.discogs_user import UserWithoutAuthentication
from discogspy.core import rq_database

user = UserWithoutAuthentication()
resp = rq_database.get_release(user, 1972502)
  1. Create a user object with user token authentication. This will allow you to send any request.
from discogspy.core.discogs_user import UserWithUserTokenBasedAuthentication
from discogspy.core import rq_database

user_with_authentication = UserWithUserTokenBasedAuthentication(user_token="your_user_token",
                                                                user_agent="your_user_agent")
resp = rq_database.get_release(user, 1972502)

Release files for discogspy 0.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for discogspy 0.6.0
File Size Uploaded
discogspy-0.6.0.tar.gz 19.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for discogspy 0.6.0
File Interpreter ABI Platform
discogspy-0.6.0-py3-none-any.whl Python 3 none any Details

Total release size: 43.7 kB

Release files / discogspy-0.6.0.tar.gz

Download URL discogspy-0.6.0.tar.gz
Size 19.6 kB
Tags Source
SHA-256 checksum
How to use checksums
ab94eed7f565c54881a4fc11206e8c0de7e80eba53de2dcfcbb2faeb5102ffc3
BLAKE2b-256 checksum
How to use checksums
606300c1768618a42748b1506bead68c4a23d04c5eac0b5ad6e4bb71b6c42510
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0.post20200106 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.8.1

Release files / discogspy-0.6.0-py3-none-any.whl

Download URL discogspy-0.6.0-py3-none-any.whl
Size 24.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
34c75c1a964870d3f55b8e4657eb4aabed072a9eb6a8180a72f5412ec37fd1fe
BLAKE2b-256 checksum
How to use checksums
b5dba2a73956d9c16d65c033b41867feac4b7ad09d649c2cfc8c9bbf922f4126
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0.post20200106 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.8.1

Release history Release notifications | RSS feed

This release

0.6.0 This release

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.5

2 release files

0.1.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page