Streamlit component that allows you to play piano
Project description
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 pianoroll_streamlit/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:
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
# 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/*
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file streamlit-pianoroll-0.7.1.tar.gz
.
File metadata
- Download URL: streamlit-pianoroll-0.7.1.tar.gz
- Upload date:
- Size: 318.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3014a394696420c9adf1ab0c1e6ccc1886bae9eb509effd80eb336ac6b9d4c3e |
|
MD5 | 92e43335d4d5033a824b14c52efecaa8 |
|
BLAKE2b-256 | adfe1ebfa9aec4768a7f5b6f8a3a1546d4a65d2cf10c154513d1b5c55c6913f0 |
File details
Details for the file streamlit_pianoroll-0.7.1-py3-none-any.whl
.
File metadata
- Download URL: streamlit_pianoroll-0.7.1-py3-none-any.whl
- Upload date:
- Size: 2.4 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0fc1afb611856101edae5f9e29b4319028b714a93ed626d646a9ab317b7e3990 |
|
MD5 | d8b638c95801b40718f992cdbc971cfd |
|
BLAKE2b-256 | 19d62ef336c74c708aed92436139bfc63d49e39b618216ad42e74b2fe3b7ecfe |