A simple Python wrapper for the setlist.fm API
Project description
Setlipy
A simple Python wrapper for the setlist.fm API
Installation
pip install setlipy
Quick Start
To get started, install setlipy, register a free account on https://www.setlist.fm/signup and apply for an API key on https://www.setlist.fm/settings/api Add your API Key to your environment:
# Get all setlists from an artist and a specific year.
# Default as JSON file format.
from setlipy import client
sfm = client.Setlipy(auth="YOUR_API_KEY")
results = sfm.setlists(artist_name="The Rolling Stones", year="2022")
json_dump = (results.json())
for idx, setlists in enumerate(json_dump["setlist"]):
print(idx, setlists)
Default file format is JSON. Use the following to request the data as XML:
# Get all setlists from an artist and a specific year.
# As XML file format.
import xml
import xml.etree.ElementTree as ET
from setlipy import client
sfm = client.Setlipy(file_format="xml", auth="YOUR_API_KEY")
results = sfm.setlists(artist_name="The Rolling Stones", year="2022")
string_xml = results.content
tree = xml.etree.ElementTree.fromstring(results.content)
print(xml.etree.ElementTree.dump(tree))
Reporting Issues
I'm happy about any suggestions you might have. If you find bugs or other issues specific to this library, file them here. Or just send a pull request.
License
MIT © Setlipy Project
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 Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file setlipy-0.0.2-py3-none-any.whl.
File metadata
- Download URL: setlipy-0.0.2-py3-none-any.whl
- Upload date:
- Size: 5.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ffc64a1a115e1586dae3320b133c53e2c345add75714af8cc714078132d0be59
|
|
| MD5 |
3b26c5ab72f0dcbeb2a1c49dd3fbf82a
|
|
| BLAKE2b-256 |
85b50ea6f64e7640836e073cac3c2e2ccc82f5186d94156de988df8cda4c0306
|