Skip to main content

Python library to build Last.fm collages

Project description

License: MIT

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

MIT

Authors

Project details


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)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lastfmcollagegenerator-0.4.13-py3-none-any.whl (410.1 kB view details)

Uploaded Python 3

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

Hashes for lastfmcollagegenerator-0.4.13.tar.gz
Algorithm Hash digest
SHA256 a916d99821893c9e939fd62875172053607583db6225f67a1cf34ba155d5fbfa
MD5 dba264d260e90180bbb365ec108b681e
BLAKE2b-256 c222974ed8a0975519dfa8d30a77ad714eaeeca26e3604c78732236b6528a37b

See more details on using hashes here.

File details

Details for the file lastfmcollagegenerator-0.4.13-py3-none-any.whl.

File metadata

File hashes

Hashes for lastfmcollagegenerator-0.4.13-py3-none-any.whl
Algorithm Hash digest
SHA256 860fc972ca3d0041b03209ec19b98e2c1c1905ba71463624c16c7aed788df2d4
MD5 619b0d82d7a46b30af9bd6d9488fd28c
BLAKE2b-256 def1120b116ac8fd3761feeda67780988676401a1a3a57c705c6dc14e43c0156

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page