Skip to main content

Control the web with Python

Project description

IDOM

Tests Code Coverage Version Info License: MIT

Libraries for creating and controlling interactive web pages with Python 3.7 and above.

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:

import idom_jupyter
idom_jupyter.run(Slideshow)

Every click will then cause the image to change (it won't here of course).

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.22.3.tar.gz (138.8 kB view details)

Uploaded Source

Built Distribution

idom-0.22.3-py2.py3-none-any.whl (152.3 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

  • Download URL: idom-0.22.3.tar.gz
  • Upload date:
  • Size: 138.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1

File hashes

Hashes for idom-0.22.3.tar.gz
Algorithm Hash digest
SHA256 2707dab3dbb356fa1ba438b83cc8e97daa9749211d44d16b2c4d60a0a3c734f5
MD5 67205fbdecd2531599a52765511fb081
BLAKE2b-256 51b1e53e7cb0b98cdc9238b227a1f154b0dfe200fd37da3489ca583c2c56d7d0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: idom-0.22.3-py2.py3-none-any.whl
  • Upload date:
  • Size: 152.3 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1

File hashes

Hashes for idom-0.22.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 7a1b02f6eb930e92a2924aa1763a9355e75053058aa3ef76c6bdf9b8708d0e7a
MD5 bfdb31968557d4f8e7e17cd90d3c37e7
BLAKE2b-256 6cf4de116d30b4492a472c1d9f91d54c076de0600daf180db1157928abe94a5a

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