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
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
streamlit-pianoroll-0.6.1.tar.gz
(301.8 kB
view hashes)
Built Distribution
Close
Hashes for streamlit-pianoroll-0.6.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 50effa73f2bd46ce1c8afce875d980a1d3c3d4d738d062ad08a1b7261fac8d6f |
|
MD5 | 8a0a7a9b679f3fc44e5612c5b9b81dd9 |
|
BLAKE2b-256 | 838579e65e717e45109b917436dfe8d082f6e063ef6f4b8bfbcbeaee0b36a298 |
Close
Hashes for streamlit_pianoroll-0.6.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c2fa38032d235d3e0d47466d5ea03f0069e269cf2f7dd9125cc3772e5b639b45 |
|
MD5 | 42f81fbe45da06b51f8d9c3c740583ff |
|
BLAKE2b-256 | b1239cf269737dfb9cb7af9d43c3ba793036231e3a65fdd43a208a3626670b02 |