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
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.3.2.tar.gz
(295.9 kB
view hashes)
Built Distribution
Close
Hashes for streamlit-pianoroll-0.3.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2906f870accabbd566461890b3b601940c2ba0fbd736b2ca89c503d7e3d584c9 |
|
MD5 | 2fdd1246218fd02bb574e82f84eea249 |
|
BLAKE2b-256 | ad35a6a3c0b2f10bf06a1d000e3fca7a1c45768613993f955abcc2ea15aaca05 |
Close
Hashes for streamlit_pianoroll-0.3.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 82dc0468a3aa019964e89e728ed9381edb6a9ed761f93f191b461334988e05c8 |
|
MD5 | e78b1e513cf0295f07a652a5eda4b083 |
|
BLAKE2b-256 | 1b8c53b2140574e4cc465475fb7a6f1be1867bf20381d84cb0a60df7612cd7c5 |