Skip to main content

Download sheet music from MuseScore

Project description

py-librescore

Python Version License: MIT

A Python library and CLI tool for downloading sheet music from MuseScore.

Note: This project is inspired by LibreScore/dl-librescore and developed by kikkopy.

Features

  • 📄 Download scores as PDF
  • 🎵 Export as MIDI
  • 🔊 Export as MP3 audio
  • 🖼️ Generate PDF from score images
  • 🚀 Parallel downloading
  • 📊 Progress tracking
  • 🔍 Metadata extraction

Installation

From PyPI

pip install py-librescore

From source

git clone https://github.com/kikkopy/py-librescore
cd py-librescore
pip install .

Quick Start

Command Line Interface

# Download a score as PDF
py-librescore "https://musescore.com/user/123/scores/456" pdf

# Download multiple formats
py-librescore "https://musescore.com/user/123/scores/456" pdf midi mp3

# Specify output directory
py-librescore "URL" pdf -o ~/Downloads

# Enable verbose output and custom workers
py-librescore "URL" pdf midi -v -w 10

Python API

from py_librescore import MuseScore, FileType
from pathlib import Path

# Initialize client
ms = MuseScore()

# Get score metadata
score = ms.get_score("https://musescore.com/user/123/scores/456")

print(f"Title: {score.title}")
print(f"ID: {score.id}")
print(f"Pages: {score.page_count}")

# Download PDF with progress
def progress_callback(current, total):
    print(f"Progress: {current}/{total}")

pdf_file = score.download(FileType.PDF, progress_callback=progress_callback)

# Save to file
score.save(FileType.PDF, Path("./scores"))

# Download all formats
files = score.download_all([FileType.PDF, FileType.MIDI, FileType.MP3])

Supported Formats

Format Description File Extension
PDF Portable Document Format .pdf
MIDI Musical Instrument Digital Interface .mid
MP3 Audio format .mp3

Documentation

For detailed documentation, see DOCUMENTATION.md.

Legal Notice

This tool is for personal and educational use only. Please respect:

  • MuseScore's Terms of Service
  • Copyright laws
  • Composers' and arrangers' rights

Only download scores that you have legal access to.

Contributing

Contributions are welcome! Please feel free to submit issues and pull requests.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

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

py_librescore-1.0.1.tar.gz (13.6 kB view details)

Uploaded Source

Built Distribution

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

py_librescore-1.0.1-py3-none-any.whl (13.2 kB view details)

Uploaded Python 3

File details

Details for the file py_librescore-1.0.1.tar.gz.

File metadata

  • Download URL: py_librescore-1.0.1.tar.gz
  • Upload date:
  • Size: 13.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.0

File hashes

Hashes for py_librescore-1.0.1.tar.gz
Algorithm Hash digest
SHA256 5fb3f0efc44b54e06702479836bdd531ce3d5295ea81cd7067382cf0f33a97dd
MD5 b1c140dabd3bd657a4cb218af3f8f621
BLAKE2b-256 b2525564aa5fd3ce96cace911c4eb7eef4ffe560a57239e9353031344e5258f0

See more details on using hashes here.

File details

Details for the file py_librescore-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: py_librescore-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 13.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.0

File hashes

Hashes for py_librescore-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 90d3a3347aca8265dbe1f568545974c1d52bdff6572e13efc21a5b0da37b8112
MD5 855e9adccb3e1e0bc86e51ff2164b3ac
BLAKE2b-256 3105cda7500163712b56b2aa671ba8fb16269d14fa335f25926b3fb8fc0cb5eb

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