Skip to main content

streamlit-music-score

Render MusicXML scores inside Streamlit using the OpenSheetMusicDisplay (OSMD) library.

You have three methods:

  • music_score Feed a musicxml string directly
  • music_score_file Read a file. It loads it first with music21. Accepts any file format that music21 accepts
  • music_score_stream Parse a music21 object. Useful if you are doing transformations with music21 and just want to visualize the result.

OSMD play functionality is only available for sponsors at the moment. As soon as it is released to the public this demo will be updated also to include play controls.

Quickstart

python -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
cd 
streamlit run example_app.py

The demo loads the sample score at examples/twinkle.musicxml and lets you upload your own MusicXML.

Usage

from streamlit_music_score import music_score, music_score_file, music_score_stream

xml = "<score-partwise>...</score-partwise>"  # MusicXML string from music21
music_score(xml, height=540)

API

  • score_xml: MusicXML string (UTF-8).
  • height: Pixel height for the component (default 540).
  • key: Optional Streamlit widget key.

Metadata

Release files for streamlit-music-score 1.0.0

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

Source distribution (sdist)

Source distribution for streamlit-music-score 1.0.0
File Size Uploaded Provenance
streamlit_music_score-1.0.0.tar.gz 5.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for streamlit-music-score 1.0.0
File Interpreter ABI Platform
streamlit_music_score-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 10.1 kB

Release files / streamlit_music_score-1.0.0.tar.gz

Download URL streamlit_music_score-1.0.0.tar.gz
Size 5.0 kB
Tags Source
SHA-256 checksum
How to use checksums
c03525f466e811ccd6f8ebc0fea76a866c79fd56595a5036a16a3f5ffeb07027
BLAKE2b-256 checksum
How to use checksums
fbb04c652c49e24538aa5e272ee69ffbf157a4f95b4bc3764eafaf9e8acbba4e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release files / streamlit_music_score-1.0.0-py3-none-any.whl

Download URL streamlit_music_score-1.0.0-py3-none-any.whl
Size 5.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bcf0053a61330f1ffd594a00abf7eea040416ad16a74ece4d3358be735bf809a
BLAKE2b-256 checksum
How to use checksums
80d69a8011c33437fd7f6f8719e175dfe25932bef3bfd5cbbcdc9701df28674b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Security for streamlit-music-score 1.0.0

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.0 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