Skip to main content

Streamlit Pianoroll

Streamlit component that allows you to play MIDI.

Installation instructions

pip install streamlit-pianoroll

Usage instructions

import streamlit as st

from pianoroll_streamlit import pianoroll

st.write("This is a pianoroll!")

pianoroll()

Development instructions

  • Initialize and run the component template frontend:
$ cd streamlit_pianoroll/frontend
$ npm install    # Install npm dependencies
$ npm run start  # Start the Webpack dev server
  • From a separate terminal, run the template's Streamlit app:
$ cd template
$ . venv/bin/activate  # activate the venv you created earlier
$ pip install -e . # install template as editable package
$ streamlit run streamlit_pianoroll/example.py  # run the example
  • If all goes well, you should see something like this:
image

Code Style

This repository uses pre-commit hooks with forced python formatting (black, flake8, and isort):

pip install pre-commit
pre-commit install

Whenever you execute git commit the files altered / added within the commit will be checked and corrected. black and isort can modify files locally - if that happens you have to git add them again. You might also be prompted to introduce some fixes manually.

To run the hooks against all files without running git commit:

pre-commit run --all-files

Publishing

Tutorial

# Prepare JS
cd streamlit_pianoroll/frontend
npm run build
cd ../..

# Releasey PYPI
echo "Update version in setup.py, pls"
python setup.py sdist bdist_wheel
python -m twine upload --repository pypi dist/*

Metadata

Release files for streamlit-pianoroll 0.7.5

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-pianoroll 0.7.5
File Size Uploaded
streamlit_pianoroll-0.7.5.tar.gz 322.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for streamlit-pianoroll 0.7.5
File Interpreter ABI Platform
streamlit_pianoroll-0.7.5-py3-none-any.whl Python 3 none any Details

Total release size: 3.0 MB

Release files / streamlit_pianoroll-0.7.5.tar.gz

Download URL streamlit_pianoroll-0.7.5.tar.gz
Size 322.4 kB
Tags Source
SHA-256 checksum
How to use checksums
486105d01f547ec7ea91d59ad4d4092dcf3c733c3677877aa150cbacbe26a675
BLAKE2b-256 checksum
How to use checksums
80022f6f3747374b58261273ecd3086e035ede0490611e14119f66be0a62fa70
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.12

Release files / streamlit_pianoroll-0.7.5-py3-none-any.whl

Download URL streamlit_pianoroll-0.7.5-py3-none-any.whl
Size 2.7 MB
Tags Python 3
SHA-256 checksum
How to use checksums
ee7442a163159259f942536ebd8ea76fc541667b4630a315817283255ff15992
BLAKE2b-256 checksum
How to use checksums
db40c524042ab082f928cb47343fbf6b584f59a3375f8bf889df7ec073c8a5b1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.12

Release history Release notifications | RSS feed

This release

0.7.5 This release

2 release files

0.7.4

2 release files

0.7.3

2 release files

0.7.2

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.3

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.1

2 release files

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