Streamlit component that allows you to play piano
Project description
streamlit-custom-component
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
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
streamlit-pianoroll-0.5.0.tar.gz
(298.5 kB
view hashes)
Built Distribution
Close
Hashes for streamlit-pianoroll-0.5.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1147fc866e151c8405b672de008b2526f7a812932841c3f643c93520b5fd02ba |
|
MD5 | 78fce98bb3d3fa10741ece1a30541a90 |
|
BLAKE2b-256 | 33d320f0ea0abcd09e9ac28498f362b56a982f1669c0dcc70c3831f9c60e7120 |
Close
Hashes for streamlit_pianoroll-0.5.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4dbb0a30e90a000d7f148f74db3535414ff3ec5f4b41b551cf90968fc2135ee5 |
|
MD5 | c58b0f484e8da54b453a5a81b4aa5c7d |
|
BLAKE2b-256 | 1333504ec7de0119b4a48eee5cd21fa50b6195e70b9476dd1d2f448e6ec5fcbb |