Skip to main content

It's React, but in Python

Project description

IDOM

Tests Version Info License: MIT

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 Binder

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

idom-0.33.0.tar.gz (147.9 kB view details)

Uploaded Source

Built Distribution

idom-0.33.0-py2.py3-none-any.whl (167.0 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file idom-0.33.0.tar.gz.

File metadata

  • Download URL: idom-0.33.0.tar.gz
  • Upload date:
  • Size: 147.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.6

File hashes

Hashes for idom-0.33.0.tar.gz
Algorithm Hash digest
SHA256 b454c7ea85489d1791148c5fead7caaf0c198f5a0e3beac4b7558bacb90ff8f3
MD5 8308ee8d152f84fea06080c3d85dc6b8
BLAKE2b-256 e5004b058514854bc5e5fbb39002a8ec750521b47dd53737d57357feec43e192

See more details on using hashes here.

File details

Details for the file idom-0.33.0-py2.py3-none-any.whl.

File metadata

  • Download URL: idom-0.33.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 167.0 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.6

File hashes

Hashes for idom-0.33.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 55e4ba153750bb2d8574d4f31fe45062ad2130f5bbcbcc77a0a83383fb1901b4
MD5 fb02f1732664b8dfe001288ea09d62d2
BLAKE2b-256 1166859b7f7ddd073672244243bfb68e6ed3f6f9cd48a88816d6a8b460a1f091

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page