It's React, but in Python
Project description
IDOM
A package for building highly interactive user interfaces in pure Python inspired by ReactJS.
Be sure to read the Documentation
IDOM is still young. If you have ideas or find a bug, be sure to post an issue or create a pull request. Thanks in advance!
Try it Now
Click the badge above to get started! It will take you to a Jupyter Notebooks hosted by Binder with some great examples.
Or Install it Now
pip install idom[stable]
At a Glance
IDOM can be used to create a simple slideshow which changes whenever a user clicks an image.
import idom
@idom.component
def Slideshow():
index, set_index = idom.hooks.use_state(0)
url = f"https://picsum.photos/800/300?image={index}"
return idom.html.img({"src": url, "onClick": lambda event: set_index(index + 1)})
idom.run(Slideshow, port=8765)
Running this will serve our slideshow to "https://localhost:8765/client/index.html"
You can even display the same thing in a Jupyter Notebook, just use idom_jupyter
:
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
Hashes for idom-0.33.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 427a1f358c99a8d6fa930ee63d43e3b359ddb2271634488a85bef34d76cae55e |
|
MD5 | c485c0509b2b88e9bf919f1f759ca5e1 |
|
BLAKE2b-256 | 3006377b112c713366c1eaddee7f5a43036a7b8a0e97da8c3cbb4a69d2ba006c |