Embed the power of Processing.org in your Streamlit app
Project description
streamlit_sp5
Embed your processing sketches in Streamlit!
Installation instructions
pip install streamlit streamlit_p5
Quickstart
streamlit run example.py
Usage instructions
The sketch object takes a few arguments:
- sketch : a string representing your P5js sketch
- width : width of the element in Streamlit
- height : height of the element in Streamlit (make sure to match these with your sketch!)
Example:
import streamlit as st
from streamlit_p5 import sketch
p5_sketch = sketch("""
function setup() {
createCanvas(700, 500);
}
// The background function is a statement that tells the computer
// which color (or gray value) to make the background of the display window
function draw() {
background(204, 153, 0);
}
""", width=700, height=500)
Wanna build this from source? just run:
python setup.py sdist bdist_wheel
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
streamlit_p5-0.0.2.tar.gz
(247.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
streamlit_p5-0.0.2-py3-none-any.whl
(496.8 kB
view details)
File details
Details for the file streamlit_p5-0.0.2.tar.gz.
File metadata
- Download URL: streamlit_p5-0.0.2.tar.gz
- Upload date:
- Size: 247.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
556cabc31f82937f4f41ba78345db5e847d4c4b8fece3931f3aa4cbd76091d82
|
|
| MD5 |
80b707299b8e58d0c365e664c1246c97
|
|
| BLAKE2b-256 |
c45ba50adad3fcfd5234eb3de91c77e09b50460ce646f5209fe9d12be54763f6
|
File details
Details for the file streamlit_p5-0.0.2-py3-none-any.whl.
File metadata
- Download URL: streamlit_p5-0.0.2-py3-none-any.whl
- Upload date:
- Size: 496.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5416a51853e2699a79ea689e07334a6ad30380b351ec8090aadca7b2530b9559
|
|
| MD5 |
0c882afd05fd52b8ccd1deb1688a0dda
|
|
| BLAKE2b-256 |
af3fe5614e981762b865b761ed3c840b792377b8600857db25e3f4b5696c717a
|