Skip to main content

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

Metadata

Release files for py-librescore 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for py-librescore 1.0.1
File Size Uploaded Provenance Actions
py_librescore-1.0.1.tar.gz 13.6 kB Without provenance Details for py_librescore-1.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for py-librescore 1.0.1
File Interpreter ABI Platform Actions
py_librescore-1.0.1-py3-none-any.whl Python 3 none any Details for py_librescore-1.0.1-py3-none-any.whl

Total release size: 26.8 kB

Release files / py_librescore-1.0.1.tar.gz

Download URL py_librescore-1.0.1.tar.gz
Size 13.6 kB
Tags Source
SHA-256 checksum
How to use checksums
5fb3f0efc44b54e06702479836bdd531ce3d5295ea81cd7067382cf0f33a97dd
BLAKE2b-256 checksum
How to use checksums
b2525564aa5fd3ce96cace911c4eb7eef4ffe560a57239e9353031344e5258f0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.0

Release files / py_librescore-1.0.1-py3-none-any.whl

Download URL py_librescore-1.0.1-py3-none-any.whl
Size 13.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
90d3a3347aca8265dbe1f568545974c1d52bdff6572e13efc21a5b0da37b8112
BLAKE2b-256 checksum
How to use checksums
3105cda7500163712b56b2aa671ba8fb16269d14fa335f25926b3fb8fc0cb5eb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.0

Security for py-librescore 1.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page