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
Built Distribution
Close
Hashes for streamlit-pianoroll-0.2.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | a60cea964da6142ac26e9817cf77c8c9a1e4a79d1511a6d5563641eaa33385fb |
|
MD5 | 6911994c954a2a5582f9c7490b4fe3ac |
|
BLAKE2b-256 | 3782b94a4515de1812fc4524f1bd292256d404414bf3108e6a8fc3e618006912 |
Close
Hashes for streamlit_pianoroll-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 39b5b11601985b237bf41d118eb1a6b6ed624004c6b998b84d96b302bc0e3273 |
|
MD5 | 13b0e01e67f40ff3d411eac4d47460a6 |
|
BLAKE2b-256 | 99b70e3e4e7361df090998b324a07f20f0fc86bb927407d9bdffce8b4219b67b |