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 pianoroll_streamlit/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
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.1.1.tar.gz
(294.9 kB
view hashes)
Built Distribution
Close
Hashes for streamlit-pianoroll-0.1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0ba6b942f9b821b6dc05f268bda8042538b16ac058ac8211a74165b33eb7340e |
|
MD5 | b1e60112c12423dbf5aeaf390c2f3168 |
|
BLAKE2b-256 | 8a3c94385ffe5a94b9fa58dc243cb4c0117dba5ef91fffc8f6ca98f44aafe1cb |
Close
Hashes for streamlit_pianoroll-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 42f2d99a79102bbd767f3192a4322e50cce585d35b2b7f95ba2ae16823716518 |
|
MD5 | 8f531d391d190e34a94f10a1898a27ac |
|
BLAKE2b-256 | 134169c4d5cbe797bb11430780412d3cd3842a57a8e8ccd077296ff50d977647 |