A set of wrapper and tools to make use of the discogs api
Project description
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
-
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 -
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.
- 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)
- 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)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file discogspy-0.6.0.tar.gz
.
File metadata
- Download URL: discogspy-0.6.0.tar.gz
- Upload date:
- Size: 19.6 kB
- Tags: Source
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ab94eed7f565c54881a4fc11206e8c0de7e80eba53de2dcfcbb2faeb5102ffc3 |
|
MD5 | e2fd6cf5ac5cf9954b321c7787f0282f |
|
BLAKE2b-256 | 606300c1768618a42748b1506bead68c4a23d04c5eac0b5ad6e4bb71b6c42510 |
File details
Details for the file discogspy-0.6.0-py3-none-any.whl
.
File metadata
- Download URL: discogspy-0.6.0-py3-none-any.whl
- Upload date:
- Size: 24.1 kB
- Tags: Python 3
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 34c75c1a964870d3f55b8e4657eb4aabed072a9eb6a8180a72f5412ec37fd1fe |
|
MD5 | 839cce5241fddc0d312a43c0b0247148 |
|
BLAKE2b-256 | b5dba2a73956d9c16d65c033b41867feac4b7ad09d649c2cfc8c9bbf922f4126 |