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
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.0.1.tar.gz
(312.8 kB
view hashes)
Built Distribution
Close
Hashes for streamlit-pianoroll-0.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | cd695b1f81caa9bab6ab3bfbdfa4b130c12b937efeb9e52cfd41cf70da18c160 |
|
MD5 | 6ae7d6a0399f1fca7b6987755e367fba |
|
BLAKE2b-256 | 2b789e796df945a0f6da19748b02358c9a25ea3c060912066145ad2107dbb2bf |
Close
Hashes for streamlit_pianoroll-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0ab9e5934bfde460c436cf9a971168064e93617f8433fda3d0cd4e93806c7e41 |
|
MD5 | 0b1b005912a42a86a5b1df3bbf983e8b |
|
BLAKE2b-256 | 23e2026046431a60fbfa6446fd62e16e7840d863fefae8c67aba838f817f7ced |