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.0.tar.gz (13.4 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.0-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: py_librescore-1.0.0.tar.gz
  • Upload date:
  • Size: 13.4 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.0.tar.gz
Algorithm Hash digest
SHA256 f523e7df74b488bd67fed73f2164c052725a72604cd72f165897c18cff763781
MD5 3f4fb8802cc0e10e9a42886e6df8e702
BLAKE2b-256 c375286818d6290ae547e1c8abe3d005c6fa29abf07b0b533018aa09dfd10479

See more details on using hashes here.

File details

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

File metadata

  • Download URL: py_librescore-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 3.8 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 df80a085c789b50b28798ea5fdb91f6e8b94651a32afd54a78b681fd8696a4e7
MD5 6f5f944cbece77994fc92c8ce1129eb6
BLAKE2b-256 a7299b53d722641b62a5686970146d011cd097bbcb64951c29f4c63d5cf1b898

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