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
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.0.tar.gz
(293.3 kB
view hashes)
Built Distribution
Close
Hashes for streamlit-pianoroll-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f329d1091b440e8aef611fea449dc3d23d8beb80b73e394e0b22e52c284b5eb3 |
|
MD5 | 3c1fc5a78c576105cb6ddf8330e0e537 |
|
BLAKE2b-256 | fe785aa088b2fb05a2e951806fdd752ebbcd39b442af7a3f8992062d15cd7f7f |
Close
Hashes for streamlit_pianoroll-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 86d3e8231da2b787c14c0670a82b4d7cd5bd6f74a86bb594fd9a52a82174072a |
|
MD5 | d9fdd6105067fdabb5d7a434378c7d77 |
|
BLAKE2b-256 | 1794d7e1243dd782bd244194f7bd1bf64303b1d7ededf03887e23c12a6fe1c13 |