|
1 |
| -# IDOM |
| 1 | +# IDOM · [](https://github.com/idom-team/idom/actions?query=workflow%3ATest) [](https://pypi.python.org/pypi/idom) [](https://github.com/idom-team/idom/blob/main/LICENSE) |
2 | 2 |
|
3 |
| -<a href="https://github.com/idom-team/idom/actions?query=workflow%3ATest"> |
4 |
| - <img alt="Tests" src="https://github.com/idom-team/idom/workflows/Test/badge.svg?event=push" /> |
5 |
| -</a> |
6 |
| -<a href="https://pypi.python.org/pypi/idom"> |
7 |
| - <img alt="Version Info" src="https://img.shields.io/pypi/v/idom.svg"/> |
8 |
| -</a> |
9 |
| -<a href="https://github.com/idom-team/idom/blob/main/LICENSE"> |
10 |
| - <img alt="License: MIT" src="https://img.shields.io/badge/License-MIT-purple.svg"> |
11 |
| -</a> |
| 3 | +IDOM is a Python package for making user interfaces. These interfaces are built from |
| 4 | +small elements of functionality like buttons text and images. IDOM allows you to combine |
| 5 | +these elements into reusable "components" that can be composed together to create |
| 6 | +complex views. |
12 | 7 |
|
13 |
| -A package for building highly interactive user interfaces in pure Python inspired by |
14 |
| -[ReactJS](https://reactjs.org/). |
15 |
| - |
16 |
| -**Be sure to [read the Documentation](https://idom-docs.herokuapp.com)** |
17 |
| - |
18 |
| -IDOM is still young. If you have ideas or find a bug, be sure to post an |
19 |
| -[issue](https://github.com/idom-team/idom/issues) |
20 |
| -or create a |
21 |
| -[pull request](https://github.com/idom-team/idom/pulls). Thanks in advance! |
22 |
| - |
23 |
| -<h3> |
24 |
| - <a |
25 |
| - target="_blank" |
26 |
| - href="https://mybinder.org/v2/gh/idom-team/idom-jupyter/main?filepath=notebooks%2Fintroduction.ipynb" |
27 |
| - > |
28 |
| - Try it Now |
29 |
| - <img alt="Binder" valign="bottom" height="25px" |
30 |
| - src="https://mybinder.org/badge_logo.svg" |
31 |
| - /> |
32 |
| - </a> |
33 |
| -</h3> |
34 |
| - |
35 |
| -Click the badge above to get started! It will take you to a [Jupyter Notebooks](https://jupyter.org/) |
36 |
| -hosted by [Binder](https://mybinder.org/) with some great examples. |
37 |
| - |
38 |
| -### Or Install it Now |
39 |
| - |
40 |
| -```bash |
41 |
| -pip install idom[stable] |
42 |
| -``` |
| 8 | +Ecosystem independence is also a core feature of IDOM. It can be added to existing |
| 9 | +applications built on a variety of sync and async web servers, as well as integrated |
| 10 | +with other frameworks like Django, Jupyter, and Plotly Dash. Not only does this mean |
| 11 | +you're free to choose what technology stack to run on, but on top of that, you can run |
| 12 | +the exact same components wherever you need them. For example, you can take a component |
| 13 | +originally developed in a Jupyter Notebook and embed it in your production application |
| 14 | +without changing anything about the component itself. |
43 | 15 |
|
44 | 16 | # At a Glance
|
45 | 17 |
|
46 |
| -IDOM can be used to create a simple slideshow which changes whenever a user clicks an image. |
| 18 | +To get a rough idea of how to write apps in IDOM, take a look at the tiny "hello |
| 19 | +world" application below: |
47 | 20 |
|
48 | 21 | ```python
|
49 |
| -import idom |
| 22 | +from idom import component, html, run |
50 | 23 |
|
51 |
| -@idom.component |
52 |
| -def Slideshow(): |
53 |
| - index, set_index = idom.hooks.use_state(0) |
54 |
| - url = f"https://picsum.photos/800/300?image={index}" |
55 |
| - return idom.html.img({"src": url, "onClick": lambda event: set_index(index + 1)}) |
| 24 | +@component |
| 25 | +def App(): |
| 26 | + return html.h1("Hello, World!") |
56 | 27 |
|
57 |
| -idom.run(Slideshow, port=8765) |
| 28 | +run(App) |
58 | 29 | ```
|
59 | 30 |
|
60 |
| -Running this will serve our slideshow to `"https://localhost:8765/client/index.html"` |
| 31 | +# Resources |
61 | 32 |
|
62 |
| -<img src='https://picsum.photos/800/300?random'/> |
| 33 | +Follow the links below to find out more about this project |
63 | 34 |
|
64 |
| -You can even display the same thing in a Jupyter Notebook, just use [`idom_jupyter`](https://github.com/idom-team/idom-jupyter): |
| 35 | +- [Try it Now](https://mybinder.org/v2/gh/idom-team/idom-jupyter/main?urlpath=lab/tree/notebooks/introduction.ipynb) - check out IDOM in a Jupyter Notebook. |
| 36 | +- [Documentation](https://idom-docs.herokuapp.com/) - learn how to install, run, and use IDOM. |
| 37 | +- [Community Forum](https://github.com/idom-team/idom/discussions) - ask questions, share ideas, and show off projects. |
| 38 | +- [Contributor Guide](https://idom-docs.herokuapp.com/docs/developing-idom/contributor-guide.html) - see how you can help develop this project. |
| 39 | +- [Code of Conduct](https://github.com/idom-team/idom/blob/main/CODE_OF_CONDUCT.md) - standards for interacting with this community. |
0 commit comments