Python client
Posted 6 Jul 2022, 21:38:29
I wrote a python client for the API, hope its useful to someone!
Posted 12 Jul 2022, 13:26:18
LOVE IT!!!
let me see what can I do with this
Posted 12 Jul 2022, 13:29:44
Thanks! Let me know if you have any feedback.
Also if you find it useful, GitHub stars are greatly appreciated :)
Posted 15 Jul 2022, 17:36:00
What does this output? I am looking to scrape the sets from various artists — will this help achieve that?
Posted 15 Jul 2022, 17:37:43
Yep! It’s just a wrapper around the api and adds some optional serialization to pydantic objects.
Posted 15 Jul 2022, 17:39:43
Thanks for the quick reply! Have some trouble installing the client— I am relatively new to Python! The error is saying “it requires a different version,” I am using 3.10.5
Posted 15 Jul 2022, 17:45:28
Thanks for letting me know – I just pushed a release (0.2.0) that should fix that for you. Let me know if your still having issues, though.
Edit – my fault, its 0.3.0 that you want
Last edited 15 Jul 2022, 17:46:41
Posted 15 Jul 2022, 23:53:07
Thank you! It finally worked.
Any pointers to outputing this into .csv or .xls?
Posted 16 Jul 2022, 0:41:11
Sure I can provide you some code to get started. What endpoint are you looking to export?
Posted 16 Jul 2022, 1:55:53
Thank you for this client! Could you provide an example of how to use the 'relevance' sort method when searching for an artist?
Posted 16 Jul 2022, 14:34:29
I am also getting the client to work, but not getting any .csv, .xls or .json output.
If you get some code on that, I'll be thrilled to test it (sweden21@hotmail.com)
Posted 16 Jul 2022, 14:56:46
hopefully this answers some of the questions here:
import setlist_fm_client
from setlist_fm_client import enums
import httpx
response: httpx.Response = setlist_fm_client.search_artists(
name=“The Strokes”,
sort=enums.Sort.relevance,
api_key=“xxx”
)
response.raise_for_status() # raise an exception if there is a non 200 status code
print(response.json())
Posted 16 Jul 2022, 19:11:29
Thank you!! Btw, it is nice that you used “The Strokes” for the example ;)