Python library to build Last.fm collages
Project description
lastfm-collage-generator
Python library to create Last.fm collages from user's top items.
It supports different configurations like the grid size or the period.
Features
- Choose the number of rows and columns (for now, up to 5)
- Choose the period to calculate the top (7day, 1month, 3month, 6month, 12month, overall. Default: 7day)
Installation
Install lastfmcollagegenerator with pip
pip install lastfmcollagegenerator
Options
Entity values
"album", "artist", "track"
Period values
"7day", "1month", "3month", "6month", "12month", "overall"
Usage/Examples
from lastfmcollagegenerator.collage_generator import CollageGenerator
collage_generator = CollageGenerator(lastfm_api_key="YOUR_API_KEY", lastfm_api_secret="YOUR_API_SECRET")
# Returns a PIL Image object
image = collage_generator.generate(entity="album", username="username", cols=5, rows=5, period="7day")
image.save("5x5 album collage.png", "png")
# Or just call the method directly
image = collage_generator.generate_top_albums_collage(username="username", cols=5, rows=5, period="7day")
image.save("5x5 album collage.png", "png")
License
Authors
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
lastfmcollagegenerator-0.4.13.tar.gz
(409.0 kB
view details)
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 lastfmcollagegenerator-0.4.13.tar.gz.
File metadata
- Download URL: lastfmcollagegenerator-0.4.13.tar.gz
- Upload date:
- Size: 409.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.4 Darwin/24.0.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a916d99821893c9e939fd62875172053607583db6225f67a1cf34ba155d5fbfa
|
|
| MD5 |
dba264d260e90180bbb365ec108b681e
|
|
| BLAKE2b-256 |
c222974ed8a0975519dfa8d30a77ad714eaeeca26e3604c78732236b6528a37b
|
File details
Details for the file lastfmcollagegenerator-0.4.13-py3-none-any.whl.
File metadata
- Download URL: lastfmcollagegenerator-0.4.13-py3-none-any.whl
- Upload date:
- Size: 410.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.4 Darwin/24.0.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
860fc972ca3d0041b03209ec19b98e2c1c1905ba71463624c16c7aed788df2d4
|
|
| MD5 |
619b0d82d7a46b30af9bd6d9488fd28c
|
|
| BLAKE2b-256 |
def1120b116ac8fd3761feeda67780988676401a1a3a57c705c6dc14e43c0156
|