a python client for the setlist.fm api
Project description
setlist-fm-client
setlist-fm-client
is a python client for the setlist.fm REST API.
Installation
pip
pip install setlist-fm-client
poetry
poetry add setlist-fm-client
Help
See the documentation for more details.
Authentication
In order to authenticate to the setlist.fm REST API, you must apply for an API key (link for logged-in users only) - if you're not registered user yet, then register first (it's free).
Once you have your key, you can use it in the setlist-fm-client by setting the SETLIST_FM_API_KEY
environment
variable or by passing api_key="xxx"
as a kwarg to any function (see docs).
Simple Example
setlist-fm-client is extremely easy to use. By setting serialize=True
, you get a pydantic model returned to you instead of
a httpx.Response
object.
Below are examples of what the code looks like for both the sync and async apis.
sync
import setlist_fm_client
setlists = setlist_fm_client.get_artist_setlists(
"0bfba3d3-6a04-4779-bb0a-df07df5b0558", api_key="xxx", serialize=True
)
print(setlists)
async
import asyncio
import setlist_fm_client
async def main():
setlists = await setlist_fm_client.get_artist_setlists(
"0bfba3d3-6a04-4779-bb0a-df07df5b0558", api_key="xxx", serialize=True
)
print(setlists)
asyncio.run(main())
This will give you an ArtistSetListResponse
object.
Project details
Release history Release notifications | RSS feed
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 setlist-fm-client-0.3.0.tar.gz
.
File metadata
- Download URL: setlist-fm-client-0.3.0.tar.gz
- Upload date:
- Size: 9.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.9.13 Linux/5.13.0-1031-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 72e09ee51d30ef06156587be0d4e111b43910f4baaee5879733e81b068b73eea |
|
MD5 | 279359f68b8a62d2430280ecae1d63fe |
|
BLAKE2b-256 | 449e39a000aae8cab2ea2ec965c2eafdad70ed1e4159206df5f9c73d59944ce8 |
File details
Details for the file setlist_fm_client-0.3.0-py3-none-any.whl
.
File metadata
- Download URL: setlist_fm_client-0.3.0-py3-none-any.whl
- Upload date:
- Size: 10.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.9.13 Linux/5.13.0-1031-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6f40a3ca35edd4a2b59e0ca008d79a8273d299b1137e823bbd1df39a7a26e3a7 |
|
MD5 | d8eb563062722202ee204acf047afcb9 |
|
BLAKE2b-256 | 166f6ed50f413c97c366b182b5887167e013ed0011245279f34279fe76e291a5 |