discogs / discogs_client

DEPRECATED - Official Python Client for the Discogs API
http://www.discogs.com/developers
Other
480 stars 132 forks source link

What is one request? #96

Closed bloniaq closed 4 years ago

bloniaq commented 5 years ago

I'm a beginner pythonist, and the answer will be probably obvious, but please, let me understand. I couldn't find answer in code, and I couldn't think up better place to ask for workflow of this library.

I do the search method and assign results to variable. Then i want to filter results. Doing some stuff like appending to an id's list if some condition.

Is a single request to discogs db an assigning operation result = d.search(album, type='release') or every filtering operation, ie getting bool value of: result[i].artists == artist_name_variation is one single request, which i need limit?

kaelruland commented 5 years ago

Just the first example. If you disconnect your internet after d.search() you'll see that you can still access all the data inside result

bloniaq commented 5 years ago

Thanks. I thought that works that way, but I experienced couple of dc's because of reaching request limits and it confused me.

bloniaq commented 5 years ago

Ok. I got releases by artist id. artist_releases = d.artist(ids).releases then i have a loop: for release in artist_releases: simple_releases[str(release.id)] = [release.title, type(release)] And when inside the loop, after a lot of steps, I got 429.

Am I doing somethin wrong? Is there a way to bypass connecting to the discogs database, when I already have a result of search? I need this dictionary to get best matching strings with external library (fuzzywuzzy - got to be praised here).

vreon commented 4 years ago

Hi, thank you for opening this issue.

Unfortunately, this project is no longer actively maintained, and today, we're archiving the repository and publishing the final version to PyPI.

We sincerely appreciate your contribution and regret that we weren't able to give it the attention it deserved.