Create highly interactive web pages purely in Python

Overview

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:

Comments
  • Reconsider how we use/advertise idom.run()

    Reconsider how we use/advertise idom.run()

    Current Situation

    idom.run() probably shouldn't be the primary advertised way of using IDOM. Especially in it's current state.

    Using a development webserver for production use is a big no-no, and by prominently displaying idom.run() as the first steps to using IDOM shows we are encouraging people to do just that. I believe the primary way of utilizing IDOM should be embedding within existing applications.

    • #654

    Proposed Actions

    • [ ] Keep idom.run() as is, but add logging to indicate idom.run() is not suited for production use.
      • ex. idom.run() is only intended for testing purposes. For production use, consider embedding IDOM within an existing project. Check out the docs for more info.
    • [ ] Expand the ease-of-use for integrating into supported web frameworks, similar to Django-IDOM
      • #653
    • [ ] Remove SharedClientState, as it is not compatible with multiprocessed webservers.
      • This is also an opportunity to rename PerClientState to IdomView

    Optional

    • Change the callable name/path to more appropriately indicate danger or for testing purposes only
      • idom.testing.webserver()
      • idom.shortcuts.run()
      • idom.devtools.run_webserver()
    • Remove the pip parameter for frameworks (it's really not needed)
      • idom.run() should raise a simple to understand exception if the user has forgotten to install a web framework
      • ex. Looks like you don't have a web framework installed. You'll need to pip install one of the following: fastapi, flask, sanic
    type: docs priority: 3 (low) type: revision 
    opened by Archmonger 23
  • add class based component implementation

    add class based component implementation

    This pull request is provisional, and it may never be merged. Hopefully it can serve as a useful reference if this is asked about in the future.

    What This Does

    This PR allows you to define components using classes similarly to how you would in React. Python's __setattr__ magic method makes it a bit easier to implement though since you no longer need an update method. Instead the instance attributes can be assigned directly.

    @idom.component
    class Counter:
        def __init__(self, count: int = 0):
            self.initial_count = self.count = count
    
        def render(self):
            return idom.html.div(
                f"Count: {self.count}",
                idom.html.button({"onClick": self.reset}, "Reset"),
                idom.html.button({"onClick": self.increment}, "+"),
                idom.html.button({"onClick": self.decrement}, "-"),
            )
    
        def increment(self, event):
            self.count += 1
    
        def decrement(self, event):
            self.count -= 1
    
        def reset(self, event):
            self.count = self.initial_count
    

    Limitations

    This PR does not allow class-based components to incur side effects. We may leave that as an intentional limitation though in order to try and push people towards functional components because they encourage better patterns of development.

    Disadvantages

    1. Having two ways to do the same thing might be confusing. Do we introduce class-based or function-based components first?
    2. Class-based components are less composable and can encourage anti-patterns - most new React libraries use hooks for this reason.
    3. It will likely be strange for users to see that mutating attributes of their components will not trigger updates. For example, appending to a list won't trigger a re-render.
    4. It probably isn't that big of a deal, but I suspect these class-based components might be less performant - users would have to understand that every attribute assignment has side effects they may not be aware of.

    Advantages

    • If used sparingly, class-based components could enable some useful imperative interfaces. This would probably be a bad use case, but in the Counter example above a parent component could increment the count by mutating its attributes.
    • Class based components could serve as a useful introduction to the execution model. The idea being that we avoid scaring off new users, but intentionally limit class-based capabilities in order to push them towards learning/using function-based ones.
    type: feature priority: 3 (low) 
    opened by rmorshea 21
  • Documentation Rewrite

    Documentation Rewrite

    This PR aims to re-organize existing documentation as well as create an outline for new documentation.

    closes: #512, #442, #444, #445, #447, #448, #449

    opened by rmorshea 20
  • ReactJS Invalid Hook Call

    ReactJS Invalid Hook Call

    Current Situation

    This error periodically shows client side and will completely break IDOM, but seems to fix itself if clearing browser cache. Something notable is I have never seen this issue when Django-IDOM was using idom==0.33.0, but that may just be coincidence.

    This is the exception stack shown in browser console.

    react-dom.js:8 Error: Minified React error #321; visit https://reactjs.org/docs/error-decoder.html?invariant=321 for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
        at a (react.js:2:4779)
        at n.useState (react.js:2:6903)
        at react-bootstrap.js:2:44831
        at ql (react-dom.js:6:52870)
        at Uu (react-dom.js:6:60908)
        at gs (react-dom.js:10:10631)
        at ms (react-dom.js:10:933)
        at pf (react-dom.js:10:864)
        at Et (react-dom.js:10:724)
        at xi (react-dom.js:8:10854)
    ai @ react-dom.js:8
    react-dom.js:10 Uncaught Error: Minified React error #321; visit https://reactjs.org/docs/error-decoder.html?invariant=321 for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
        at a (react.js:2:4779)
        at n.useState (react.js:2:6903)
        at react-bootstrap.js:2:44831
        at ql (react-dom.js:6:52870)
        at Uu (react-dom.js:6:60908)
        at gs (react-dom.js:10:10631)
        at ms (react-dom.js:10:933)
        at pf (react-dom.js:10:864)
        at Et (react-dom.js:10:724)
        at xi (react-dom.js:8:10854)
    client.js:23649 The above error occurred in the <_ImportedElement> component:
    
        at _ImportedElement (http://127.0.0.1:7575/static/django_idom/client.js:31103:29)
        at ImportedElement (http://127.0.0.1:7575/static/django_idom/client.js:31075:28)
        at Element (http://127.0.0.1:7575/static/django_idom/client.js:31046:20)
        at div
        at StandardElement (http://127.0.0.1:7575/static/django_idom/client.js:31060:28)
        at Element (http://127.0.0.1:7575/static/django_idom/client.js:31046:20)
        at Layout (http://127.0.0.1:7575/static/django_idom/client.js:31034:19)
    
    Consider adding an error boundary to your tree to customize error handling behavior.
    Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.
    logCapturedError @ client.js:23649
    client.js:2691 Uncaught Error: Minified React error #321; visit https://reactjs.org/docs/error-decoder.html?invariant=321 for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
        at a (react.js:2:4779)
        at n.useState (react.js:2:6903)
        at react-bootstrap.js:2:44831
        at ql (react-dom.js:6:52870)
        at Uu (react-dom.js:6:60908)
        at gs (react-dom.js:10:10631)
        at ms (react-dom.js:10:933)
        at pf (react-dom.js:10:864)
        at Et (react-dom.js:10:724)
        at xi (react-dom.js:8:10854)
    

    Proposed Actions

    Determine root cause and develop a solution.

    I seem to be semi-frequently able to reproduce this if leaving my webserver running django-idom up while putting my Windows 10 machine to sleep for >12 hours.

    See https://github.com/idom-team/idom/discussions/610 for the original discussion.

    Work Items

    See above.

    type: bug priority: 2 (moderate) 
    opened by Archmonger 17
  • Use LXML for html_to_vdom

    Use LXML for html_to_vdom

    fix #777

    Technical Details

    • Generate a DOM tree using lxml
    • Recursively converts lxml tree to VDOM
    • HTML is encapsulated within a React fragment if needed
    • Style tags are handled separately
    • Utilize idom.html constructors for VDOM when possible
    • Unneeded VDOM fields are pruned after user transformations are applied
    • Uses list comprehension where possible for maximum performance

    Checklist

    Please update this checklist as you complete each item:

    • [x] Tests have been included for all bug fixes or added functionality.
    • [x] The changelog.rst has been updated with any significant changes.
    • [x] GitHub Issues which may be closed by this Pull Request have been linked.
    opened by Archmonger 13
  • Test suite does not run WebDriver tests on Windows

    Test suite does not run WebDriver tests on Windows

    Summary

    At the moment WebDriver tests are not run on Windows because they are failing for some unknown reason.

    How To Work On This Bug

    At the moment WebDriver tests are being skipped. To unskip them when you run the test suite comment out these lines:

    https://github.com/idom-team/idom/blob/2804ae2620d4a2b719684460fd56b97deb65b4ba/tests/conftest.py#L151-L161

    Current Findings

    I don't have a Windows machine myself so it's quite difficult to try and debug. Further the tracebacks and logs that are produced don't really help much in figuring out what the problem is. The only thing I've been able to identify is that not all the files are being loaded from the server when loading up the index.html page.

    On Linux (expected behavior):

    [2021-01-29 16:40:55 -0800] - (sanic.access)[INFO][127.0.0.1:56132]: GET http://localhost:5000/  302 0
    [2021-01-29 16:40:55 -0800] - (sanic.access)[INFO][127.0.0.1:56132]: GET http://localhost:5000/client/index.html  200 387
    [2021-01-29 16:40:55 -0800] - (sanic.access)[INFO][127.0.0.1:56132]: GET http://localhost:5000/client/index.js  200 982
    [2021-01-29 16:40:55 -0800] - (sanic.access)[INFO][127.0.0.1:56132]: GET http://localhost:5000/client/web_modules/idom-client-react.js  200 39291
    [2021-01-29 16:40:55 -0800] - (sanic.access)[INFO][127.0.0.1:56132]: GET http://localhost:5000/client/web_modules/htm.js  200 1220
    [2021-01-29 16:40:55 -0800] - (sanic.access)[INFO][127.0.0.1:56136]: GET http://localhost:5000/client/web_modules/common/index-6ed86a98.js  200 9836
    

    On Windows (missing GET requests):

    [2021-01-30 00:32:17 -0000] - (sanic.access)[INFO][127.0.0.1:50486]: GET http://127.0.0.1:50482/  302 0
    [2021-01-30 00:32:17 -0000] - (sanic.access)[INFO][127.0.0.1:50486]: GET http://127.0.0.1:50482/client/index.html  200 403
    [2021-01-30 00:32:17 -0000] - (sanic.access)[INFO][127.0.0.1:50486]: GET http://127.0.0.1:50482/client/index.js  200 1016
    

    This is odd because index.js should import idom-client-react.js which itself imports other JS files, however the expected requests are missing when running the test suite in CI.

    Get Support

    I'm happy to help debug this issue with anyone who's interested in investigating.

    type: bug priority: 2 (moderate) 
    opened by rmorshea 13
  • Serialize Form Data

    Serialize Form Data

    Current Situation

    Currently, onSubmit events for form elements do not serialize the data contained within them. To do this we need to serialize the form.elements attribute.

    Proposed Changes

    diff --git a/src/client/packages/idom-client-react/src/event-to-object.js b/src/client/packages/idom-client-react/src/event-to-object.js
    index b11e653..80b098b 100644
    --- a/src/client/packages/idom-client-react/src/event-to-object.js
    +++ b/src/client/packages/idom-client-react/src/event-to-object.js
    @@ -49,6 +49,13 @@ const elementTransformCategories = {
           return {};
         }
       },
    +  hasElements: (element) => {
    +    const result = {};
    +    for (key in element.elements) {
    +      result[key] = serializeDomElement(element.elements[key]);
    +    }
    +    return result;
    +  }
     };
     
     function defaultElementTransform(element) {
    @@ -69,6 +76,7 @@ const elementTagCategories = {
       ],
       hasCurrentTime: ["AUDIO", "VIDEO"],
       hasFiles: ["INPUT"],
    +  hasElements: ["FORM"],
     };
     
     const elementTransforms = {};
    

    Implementation Details

    No response

    type: feature flag: good first issue priority: 2 (moderate) 
    opened by rmorshea 12
  • `html_to_vdom` transform to remove html/body but preserve head content

    `html_to_vdom` transform to remove html/body but preserve head content

    There's currently some awkwardness in converting django views to VDOM, due to the fact that the head content is never loaded into the page.

    For example, CSS/JS that is within <head> is simply never added to the page.

    This PR makes html_to_vdom use the same approach browsers use when merging two HTML/body node trees. Namely, the contents of the <head> and <body> tags are directly spit out onto the page, while removing those top level tags themselves.

    Checklist

    Please update this checklist as you complete each item:

    • [X] Tests have been included for all bug fixes or added functionality.
    • [x] The changelog.rst has been updated with any significant changes.
    • [X] GitHub Issues which may be closed by this Pull Request have been linked.
    opened by Archmonger 11
  • React error when running component with material-ui in Jupyter

    React error when running component with material-ui in Jupyter

    Bug description

    When I try to create a button with material-ui/core it comes out blank and an error is printed in the console: Error: Minified React error #321; visit https://reactjs.org/docs/error-decoder.html?invariant=321 for the full message or use the non-minified dev environment for full errors and additional helpful warnings.

    The link points to 3 possible causes:

    1. You might have mismatching versions of React and the renderer (such as React DOM)
    2. You might be breaking the Rules of Hooks
    3. You might have more than one copy of React in the same app See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.

    To reproduce

    Run the following Jupyter cell:

    import json
    import idom_jupyter
    import idom
    
    material_ui = idom.install("@material-ui/core", fallback="loading...")
    
    @idom.component
    def ViewButtonEvents():
        event, set_event = idom.hooks.use_state(None)
    
        return idom.html.div(
            material_ui.Button(
                {
                    "color": "primary",
                    "variant": "contained",
                    "onClick": lambda event: set_event(event),
                },
                "Click Me!",
            ),
            idom.html.pre(json.dumps(event, indent=2)),
        )
    
    ViewButtonEvents()
    

    Expected behavior

    Expected to see a material-ui button

    Additional context

    It works fine with the victory example, I see the expected bar chart.

    Versions:

    • jupyter 1.0.0
    • idom 0.22.5
    • idom-jupyter 0.5.1
    type: bug 
    opened by stevenheidel 11
  • Refactor Code and Docs

    Refactor Code and Docs "Server" Verbiage

    Current Situation

    There are a lot of locations in the source & docs where we currently call things "server", when they really should be called "web frameworks"

    Proposed Actions

    Rename functions, comments, and docs while keeping these guidelines in mind

    • Web Framework = FastAPI, Flask, Sanic, Tornado, Django
    • Web Server = Gunicorn, Uvicorn, Hypercorn, Daphne, Built-in development servers, etc
    • Reactive Component Framework = IDOM
      • It's an easier way to distinguish us rather than the more literal "we are a web framework built on-top of web frameworks"
    • Views = Built-ins that assist in plopping something visual onto the page
    • Components = We are already pretty good about the usage of "component", no need for change
    type: docs priority: 3 (low) type: refactor 
    opened by Archmonger 10
  • File not found error on page refresh (0.28.0)

    File not found error on page refresh (0.28.0)

    With idom 0.28.0[stable] a regression was introduced where refreshing the page yields a Error: File not found error. Downgrading to 0.27.0 fixes the issue.

    This appears to be resolved in main now, but we should introduce a test to catch this in the future.

    Originally posted by @brentbaum in https://github.com/idom-team/idom/discussions/388

    type: bug priority: 2 (moderate) 
    opened by rmorshea 9
  • `script` elements can break IDOM

    `script` elements can break IDOM

    Current Situation

    If an exception occurs within a script element, all of IDOM breaks.

    Proposed Actions

    Add error boundaries to prevent the script element from being destructive

    type: bug priority: 3 (low) 
    opened by Archmonger 1
  • Move `idom.widgets.hotswap` to testing utils

    Move `idom.widgets.hotswap` to testing utils

    Discussed in https://github.com/idom-team/idom/discussions/865


    Originally posted by Archmonger December 30, 2022 Ever since we've formalized support for conditionally rendered components, hotswap seems to have become a rather pointless utility.

    This conversation is to discuss whether to deprecate/remove it.


    Originally posted by rmorshea December 30, 2022 The primary function isn't really to facilitate conditional rendering. Rather, it's to allow you to swap components from outside the normal rendering flow. With that said, it's uses are pretty niche. At the moment it has one usage in IDOM's testing utilities. I'd say it would make sense to turn it into a private util in idom.testing.backend.

    priority: 3 (low) 
    opened by Archmonger 0
  • Bump fast-json-patch from 3.1.0 to 3.1.1 in /src/client

    Bump fast-json-patch from 3.1.0 to 3.1.1 in /src/client

    Bumps fast-json-patch from 3.1.0 to 3.1.1.

    Release notes

    Sourced from fast-json-patch's releases.

    3.1.1

    Security Fix for Prototype Pollution - huntr.dev #262

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    type: dependencies javascript 
    opened by dependabot[bot] 0
  • Switch docs to mkdocs

    Switch docs to mkdocs

    Current Situation

    It is difficult for new contributors to modify the docs, due to the current usage of reStructuredText (RST).

    Proposed Actions

    Convert the current docs from reStructuredText (sphinx) to Markdown (mkdocs).

    Also consider using these plugins

    • https://github.com/jimporter/mike for docs versioning
    • https://github.com/fralau/mkdocs_macros_plugin for code actions
    • https://github.com/greenape/mknotebooks or https://github.com/danielfrg/mkdocs-jupyter for embedding jupyter into the page
    type: docs flag: good first issue priority: 3 (low) 
    opened by Archmonger 2
  • fix tests + upgrade doc dependencies

    fix tests + upgrade doc dependencies

    Checklist

    Please update this checklist as you complete each item:

    • [ ] Tests have been included for all bug fixes or added functionality.
    • [ ] The changelog.rst has been updated with any significant changes.
    • [ ] GitHub Issues which may be closed by this Pull Request have been linked.
    opened by rmorshea 0
  • BackendFixture fails with Sanic because missing `test_mode`

    BackendFixture fails with Sanic because missing `test_mode`

    Discussed in https://github.com/idom-team/idom/discussions/860

    Originally posted by ahopkins December 29, 2022 The problem was reported here: https://github.com/sanic-org/sanic/issues/2643.

    The issue is that the BackendFixture for testing Sanic does not set Sanic.test_mode = True, which means that there is potential for issues (as seen the linked issue) to arise. I propose that you add this into your test implementation for Sanic to automatically manage setting that variable.

    type: bug type: tests 
    opened by rmorshea 0
Releases(0.42.0)
  • 0.42.0(Dec 2, 2022)

    What's Changed

    • fix cov by @rmorshea in https://github.com/idom-team/idom/pull/831
    • remove IDOM_FEATURE_INDEX_AS_DEFAULT_KEY opt by @rmorshea in https://github.com/idom-team/idom/pull/840
    • allow users to configure html head by @rmorshea in https://github.com/idom-team/idom/pull/835
    • better run func warning by @rmorshea in https://github.com/idom-team/idom/pull/842
    • Make IDOM_DEBUG_MODE mutable + add Option.subscribe method by @rmorshea in https://github.com/idom-team/idom/pull/843
    • Form serialize by @acivitillo in https://github.com/idom-team/idom/pull/699
    • html_to_vdom transform to remove html/body but preserve head content by @Archmonger in https://github.com/idom-team/idom/pull/832
    • add svg elements by @rmorshea in https://github.com/idom-team/idom/pull/844

    Full Changelog: https://github.com/idom-team/idom/compare/0.41.0...0.42.0

    Source code(tar.gz)
    Source code(zip)
  • 0.41.0(Nov 2, 2022)

    What's Changed

    • remove extra element added by test fixture by @rmorshea in https://github.com/idom-team/idom/pull/812
    • Bump vm2 from 3.9.9 to 3.9.11 in /src/client by @dependabot in https://github.com/idom-team/idom/pull/814
    • changed first name to last name and email in dict_update.py by @Kurtsley in https://github.com/idom-team/idom/pull/815
    • allow string return type by @rmorshea in https://github.com/idom-team/idom/pull/817
    • Fix model state ID logging by @Archmonger in https://github.com/idom-team/idom/pull/818
    • fix windows tests by @rmorshea in https://github.com/idom-team/idom/pull/820
    • add use_connection hook by @rmorshea in https://github.com/idom-team/idom/pull/823
    • Vite by @rmorshea in https://github.com/idom-team/idom/pull/824
    • define state as a generic named tuple by @rmorshea in https://github.com/idom-team/idom/pull/827

    New Contributors

    • @Kurtsley made their first contribution in https://github.com/idom-team/idom/pull/815

    Full Changelog: https://github.com/idom-team/idom/compare/0.40.2...0.41.0

    Source code(tar.gz)
    Source code(zip)
  • 0.40.2(Sep 13, 2022)

    What's Changed

    • bypass jsonpatch by @rmorshea in https://github.com/idom-team/idom/pull/809

    Full Changelog: https://github.com/idom-team/idom/compare/0.40.1...0.40.2

    Source code(tar.gz)
    Source code(zip)
  • 0.40.1(Sep 12, 2022)

    What's Changed

    • Remove old "missing react hooks" note by @Archmonger in https://github.com/idom-team/idom/pull/805
    • fix append to stale children ref by @rmorshea in https://github.com/idom-team/idom/pull/807

    Full Changelog: https://github.com/idom-team/idom/compare/0.40.0...0.40.1

    Source code(tar.gz)
    Source code(zip)
  • 0.40.0(Aug 14, 2022)

    What's Changed

    • test python 3.10 by @rmorshea in https://github.com/idom-team/idom/pull/767
    • add asgiref dep + set default timeout on page by @rmorshea in https://github.com/idom-team/idom/pull/776
    • Track contexts in hooks as state by @rmorshea in https://github.com/idom-team/idom/pull/787
    • use strict equality for text, numeric, and binary types by @rmorshea in https://github.com/idom-team/idom/pull/790
    • make nox-session reusable workflow by @rmorshea in https://github.com/idom-team/idom/pull/791
    • update error messages by @rmorshea in https://github.com/idom-team/idom/pull/792
    • Bump jsdom from 16.3.0 to 16.5.0 in /src/client by @dependabot in https://github.com/idom-team/idom/pull/774
    • Bump got from 11.8.3 to 11.8.5 in /src/client by @dependabot in https://github.com/idom-team/idom/pull/772
    • Fix: Accidental mutation of old model causes invalid JSON Patch by @rmorshea in https://github.com/idom-team/idom/pull/802
    • Use LXML for html_to_vdom by @Archmonger in https://github.com/idom-team/idom/pull/795

    Full Changelog: https://github.com/idom-team/idom/compare/0.39.0...0.40.0

    Source code(tar.gz)
    Source code(zip)
  • 0.39.0(Jun 20, 2022)

    What's Changed

    • Readme Overhaul by @Archmonger in https://github.com/idom-team/idom/pull/705
    • Update good_conditional_todo_list.py by @jmtaysom in https://github.com/idom-team/idom/pull/745
    • Another Readme Update by @Archmonger in https://github.com/idom-team/idom/pull/747
    • Replace changelog CI with greetings by @Archmonger in https://github.com/idom-team/idom/pull/752
    • fix mimetype issue by @rmorshea in https://github.com/idom-team/idom/pull/762
    • Fix idom.run and more renaming of server to backend by @rmorshea in https://github.com/idom-team/idom/pull/763
    • Change function name in readme example by @Archmonger in https://github.com/idom-team/idom/pull/750
    • ability to specify version in template + no more exports_default by @rmorshea in https://github.com/idom-team/idom/pull/765

    Full Changelog: https://github.com/idom-team/idom/compare/0.38.1...0.39.0

    Source code(tar.gz)
    Source code(zip)
  • 0.38.1(Apr 16, 2022)

    What's Changed

    • add missing file extension by @rmorshea in https://github.com/idom-team/idom/pull/736

    Full Changelog: https://github.com/idom-team/idom/compare/0.38.0...0.38.1

    Source code(tar.gz)
    Source code(zip)
  • 0.38.0(Apr 16, 2022)

    What's Changed

    • Rework How IDOM Integrates With Servers by @rmorshea in https://github.com/idom-team/idom/pull/703
    • Implement use_location by @rmorshea in https://github.com/idom-team/idom/pull/721
    • Use "backend" instead of "server" by @rmorshea in https://github.com/idom-team/idom/pull/726
    • make Layout context management async by @rmorshea in https://github.com/idom-team/idom/pull/730
    • Improve Changelog by @rmorshea in https://github.com/idom-team/idom/pull/731
    • add use debug value hook by @rmorshea in https://github.com/idom-team/idom/pull/733

    Full Changelog: https://github.com/idom-team/idom/compare/0.37.2...0.38.0

    Source code(tar.gz)
    Source code(zip)
  • 0.38.0-a4(Apr 16, 2022)

    What's Changed

    • add use debug value hook by @rmorshea in https://github.com/idom-team/idom/pull/733

    Full Changelog: https://github.com/idom-team/idom/compare/0.38.0-a3...0.38.0-a4

    Source code(tar.gz)
    Source code(zip)
  • 0.38.0-a3(Apr 15, 2022)

    What's Changed

    • make Layout context management async by @rmorshea in https://github.com/idom-team/idom/pull/730
    • Improve Changelog by @rmorshea in https://github.com/idom-team/idom/pull/731

    Full Changelog: https://github.com/idom-team/idom/compare/0.38.0-a2...0.38.0-a3

    Source code(tar.gz)
    Source code(zip)
  • 0.38.0-a2(Apr 15, 2022)

    What's Changed

    • Implement use_location by @rmorshea in https://github.com/idom-team/idom/pull/721
    • Use "backend" instead of "server" by @rmorshea in https://github.com/idom-team/idom/pull/726

    Full Changelog: https://github.com/idom-team/idom/compare/0.38.0-a1...0.38.0-a2

    Source code(tar.gz)
    Source code(zip)
  • 0.38.0-a1(Mar 28, 2022)

    What's Changed

    • Rework How IDOM Integrates With Servers by @rmorshea in https://github.com/idom-team/idom/pull/703

    Full Changelog: https://github.com/idom-team/idom/compare/0.37.2...0.38.0-a1

    Source code(tar.gz)
    Source code(zip)
  • 0.37.2(Mar 27, 2022)

    What's Changed

    • rename proto modules to types by @rmorshea in https://github.com/idom-team/idom/pull/701
    • Update running-idom.rst by @jmtaysom in https://github.com/idom-team/idom/pull/710
    • Bugfix for wss protocol issue. by @liberty-rising in https://github.com/idom-team/idom/pull/716

    New Contributors

    • @jmtaysom made their first contribution in https://github.com/idom-team/idom/pull/710
    • @liberty-rising made their first contribution in https://github.com/idom-team/idom/pull/716

    Full Changelog: https://github.com/idom-team/idom/compare/0.37.1...0.37.2

    Source code(tar.gz)
    Source code(zip)
  • 0.37.1(Mar 5, 2022)

    What's Changed

    Nothing has changed since 0.37.1-a2, but this is what's changed since 0.37.0:

    • set target value onchange client-side by @rmorshea in https://github.com/idom-team/idom/pull/694
    • actually fix #684 by @rmorshea in https://github.com/idom-team/idom/pull/696
    • fix flicker with observedValues buffer by @rmorshea in https://github.com/idom-team/idom/pull/697

    Full Changelog: https://github.com/idom-team/idom/compare/0.37.0...0.37.1

    Source code(tar.gz)
    Source code(zip)
  • 0.37.1-a2(Mar 3, 2022)

    What's Changed

    • set target value onchange client-side by @rmorshea in https://github.com/idom-team/idom/pull/694
    • actually fix #684 by @rmorshea in https://github.com/idom-team/idom/pull/696
    • fix flicker with observedValues buffer by @rmorshea in https://github.com/idom-team/idom/pull/697

    Full Changelog: https://github.com/idom-team/idom/compare/0.37.0...0.37.1-a2

    Source code(tar.gz)
    Source code(zip)
  • 0.37.1-a1(Feb 28, 2022)

    What's Changed

    • set target value onchange client-side by @rmorshea in https://github.com/idom-team/idom/pull/694

    Full Changelog: https://github.com/idom-team/idom/compare/0.37.0...0.37.1-a1

    Source code(tar.gz)
    Source code(zip)
  • 0.37.0(Feb 28, 2022)

    What's Changed

    • docs for components sharing state by @acivitillo in https://github.com/idom-team/idom/pull/571
    • support keys in HTML fragments by @rmorshea in https://github.com/idom-team/idom/pull/683
    • Add Use Context Hook by @rmorshea in https://github.com/idom-team/idom/pull/585
    • reset schedule_render_later flag after triggering by @rmorshea in https://github.com/idom-team/idom/pull/688
    • reorganize creating-interfaces + add info on fragments by @rmorshea in https://github.com/idom-team/idom/pull/685
    • Re-organize docs + start using "Keep a Changelog" style by @rmorshea in https://github.com/idom-team/idom/pull/689
    • load import source in effect by @rmorshea in https://github.com/idom-team/idom/pull/691

    New Contributors

    • @acivitillo made their first contribution in https://github.com/idom-team/idom/pull/571

    Full Changelog: https://github.com/idom-team/idom/compare/0.36.3...0.37.0

    Source code(tar.gz)
    Source code(zip)
  • 0.36.3(Feb 18, 2022)

    Misc bug fixes along with a minor improvement that allows components to return None to render nothing.

    Closed Issues

    • All child states wiped upon any child key change - #652
    • Allow NoneType returns within components - #538

    Merged Pull Requests

    • fix #652 - #672
    • Fix 663 - #667
    Source code(tar.gz)
    Source code(zip)
  • 0.36.2(Feb 3, 2022)

  • 0.36.1(Feb 3, 2022)

    Includes bug fixes and renames the configuration option IDOM_WED_MODULES_DIR to IDOM_WEB_MODULES_DIR with a corresponding deprecation warning.

    Closed Issues

    • Fix Key Error When Cleaning Up Event Handlers - #640
    • Update Script Tag Behavior - #628

    Merged Pull Requests

    • mark old state as None if unmounting - #641
    • rename IDOM_WED_MODULES_DIR to IDOM_WEB_MODULES_DIR - #638
    Source code(tar.gz)
    Source code(zip)
  • 0.36.0(Jan 31, 2022)

    This release includes an important fix for errors produced after #623 was merged. In addition there is not a new http.script element which can behave similarly to a standard HTML <script> or, if no attributes are given, operate similarly to an effect. If no attributes are given, and when the script evaluates to a function, that function will be called the first time it is mounted and any time the content of the script is subsequently changed. If the function then returns another function, that returned function will be called when the script is removed from the view, or just before the content of the script changes.

    Closed Issues

    • #629
    • #544

    Pull Requests

    • #632
    • #631
    • #617
    Source code(tar.gz)
    Source code(zip)
  • 0.35.4(Jan 27, 2022)

    Keys for elements at the root of a component were not being tracked. Thus key changes for elements at the root did not trigger unmounts.

    Closed Issues

    • #622

    Pull Requests

    • #623
    Source code(tar.gz)
    Source code(zip)
  • 0.35.3(Jan 27, 2022)

    As part of #614, elements which changed type were not deeply unmounted. This behavior is probably undesirable though since the state for children of the element in question would persist (probably unexpectedly).

    Pull Requests

    • Always deeply unmount - #620
    Source code(tar.gz)
    Source code(zip)
  • 0.35.2(Jan 27, 2022)

    This release includes several bug fixes. The most significant of which is the ability to change the type of an element in the try (i.e. to and from being a component) without getting an error. Originally the errors were introduced because it was though changing element type would not be desirable. This was not the case though - swapping types turns out to be quite common and useful.

    Source code(tar.gz)
    Source code(zip)
  • 0.35.1(Jan 19, 2022)

  • 0.35.0(Jan 19, 2022)

    The highlight of this release is that the default "key" of all elements will be their index amongst their neighbors. Previously this behavior could be engaged by setting IDOM_FEATURE_INDEX_AS_DEFAULT_KEY=1 when running IDOM. In this release though, you will need to explicitely turn off this feature (i.e. =0) to return to the old behavior. With this change, some may notice additional error logs which warn that:

    Key not specified for child in list ...
    

    This is saying is that an element or component which was created in a list does not have a unique key. For more information on how to mitigate this warning refer to the docs on "Organizing Items With Keys".

    Closed Issues

    • #588
    • #584
    • #562
    • #556
    • #542
    • #475
    • #440
    • #351

    Pull Requests

    • #593
    • #590
    • #586
    • #579
    • #564
    • #563
    • #554
    Source code(tar.gz)
    Source code(zip)
  • 0.34.0(Dec 17, 2021)

    This release contains a variety of minor fixes and improvements which came out of rewriting the documentation. The most significant of these changes is the remove of target element attributes from the top-level of event data dictionaries. For example, instead of being able to find the value of an input at event["value"] it willinstead be found at event["target"]["value"]. For a short period we will issue a DeprecationWarning when target attributes are requested at the top-level of the event dictionary. As part of this change we also add event["currentTarget"] and event["relatedTarget"] keys to the event dictionary as well as a event[some_target]["boundingClientRect"] where some_target may be "target", "currentTarget" or "relatedTarget".

    Closed Issues

    • Move target attributes to event['target'] - #548

    Pull Requests

    • Correctly Handle Target Event Data - #550
    • Clean up WS console logging - #522
    • automatically infer closure arguments - #520
    • Documentation Rewrite - #519
    • add option to replace existing when creating a module - #516
    Source code(tar.gz)
    Source code(zip)
  • 0.33.3(Oct 9, 2021)

    0.33.3

    Contains a small number of bug fixes and improvements. The most significant change is the addition of a warning stating that IDOM_FEATURE_INDEX_AS_DEFAULT_KEY=1 will become the default in a future release. Beyond that, a lesser improvement makes it possible to use the default export from a Javascript module when calling module_from_template by specifying exports_default=True as a parameter.

    Closed Issues

    • Memory leak in SharedClientStateServer - #511
    • Cannot use default export in react template - #502
    • Add warning that element index will be used as the default key in a future release - #428

    Pull Requests

    • warn that IDOM_FEATURE_INDEX_AS_DEFAULT_KEY=1 will be the default - #515
    • clean up patch queues after exit - #514
    • Remove Reconnecting WS alert - #513
    • Fix #502 - #503
    Source code(tar.gz)
    Source code(zip)
  • 0.33.2(Sep 5, 2021)

    A release to fix a memory leak caused by event handlers that were not being removed when components updated.

    Closed Issues

    • Non-root component event handlers cause memory leaks - #510
    Source code(tar.gz)
    Source code(zip)
  • 0.33.1(Sep 3, 2021)

    A hot fix for a regression introduced in 0.33.0 where the root element of the layout could not be updated. See #498 for more info. A regression test for this will be introduced in a future release.

    Pull Requests

    • Fix #498 pt1 - #501
    Source code(tar.gz)
    Source code(zip)
A small manager/GUI Frontend for QEMU written in Python

qemu-manager A small manager/GUI Frontend for QEMU written in Python Requirements You'll need to have the following tools installed to run this: QEMU

yeppiidev 15 Dec 21, 2022
TextTUI is a set of extensions to the Textual and Textual-Inputs libraries

TextTUI is a set of extensions to the Textual and Textual-Inputs libraries. Currently a Work in Progress that is based on the 0.1.14 branch of

3 Feb 10, 2022
This is the new and improved Plex Automatic Pre-roll script with a GUI

Plex-Automatic-Pre-roll-GUI This is the new and improved Plex Automatic Pre-roll script with a GUI! It should be stable but if you find a bug please l

164 Nov 04, 2022
This repository contains some projects that I have done using Python + Tkinter.

This repository contains some projects that I have done using Python + Tkinter.

João Victor Vilela dos Santos 1 Nov 10, 2021
Basic Alarm Clock using Python.

Basic Alarm Clock using Python.

Samyak Jain 2 Feb 10, 2022
ROS2 + PyQt5 Example

ROS2 + PyQt5 Example

Ar-Ray 4 Nov 15, 2022
PyCG: Practical Python Call Graphs

PyCG - Practical Python Call Graphs PyCG generates call graphs for Python code using static analysis. It efficiently supports Higher order functions T

Vitalis Salis 185 Dec 29, 2022
GUI based app made in python using tkinter

Virtual Keyboard A GUI application made in python using tkinter This is my first ever proper GUI based application project after learning tkinter rece

AbhineetK 10 Dec 10, 2022
This is a short GUI project to evaluate Pbk solution.

Polubarinova-Kochina-solutions (Standalone GUI executables for Windows and Mac) Oden Institute for Computational Engineering and Sciences / Jackson Sc

Mohammad Afzal Shadab 1 Dec 24, 2022
Write desktop and web apps in pure Python

Flexx Want to stay up-to-date about (changes to) Flexx? Subscribe to the NEWS issue. Introduction Flexx is a pure Python toolkit for creating graphica

flexxui 3.1k Dec 29, 2022
Dear PyGui Extensions is a collection of useful tools, abstractions, and simplification layers built with/for Dear PyGui users.

Dear PyGui Extensions: A collection of useful tools, abstractions, and simplification layers built with/for Dear PyGui users.

Jonathan Hoffstadt 34 Jan 01, 2023
Linux GUI app to codon optimize a directory with fasta files using taxonomy ids imported as a 1-column txt file (1 taxonomy id for each file)

codon optimize cds paired with taxids singlefastas gui Linux GUI app to codon optimize a directory with fasta files using taxonomy ids imported as a 1

Olga Tsiouri 1 Jan 09, 2022
Quebra cabeça - Utilizando biblioteca do python: PyQt5

Puzzle 3x3 PyQt5 - Windows Quebra cabeça - Utilizando biblioteca do python: PyQt5 Para testar este quebra cabeça na sua maquina, primeiramente faça o

Matheus Marsal 1 Dec 21, 2021
Tkinter calculetor - Tkinter calculetor with python

Tkinter_calculetor required to run py file pip install tkinter

Yasir Arafat 0 Feb 07, 2022
A library for building modern declarative desktop applications in WX.

re-wx is a library for building modern declarative desktop applications. It's built as a management layer on top of WXPython, which means you get all the goodness of a mature, native, cross-platform

Chris 115 Dec 24, 2022
MediaPlayer-with-PyQt5 - The Multimedia Player with Python and PyQt5

MediaPlayer-with-PyQt5 I made this Multimedia Player with Python and PyQt5, I re

4 Oct 06, 2022
A desktop application developed in Python with PyQt5 to predict demand and help monitor and schedule brewing processes for Barnaby's Brewhouse.

brewhouse-management A desktop application developed in Python with PyQt5 to predict demand and help monitor and schedule brewing processes for Barnab

Isaac Cheng 2 Jul 09, 2022
A GUI for designing Python GUI's for PySimpleGUI.

SimpleGUIBuilder A GUI for designing Python GUI's for PySimpleGUI. Installation There is none :) just download the file from a release and run it. Don

Miguel Martins 65 Dec 22, 2022
Build GUI for your Python program with JavaScript, HTML, and CSS

https://pywebview.flowrl.com pywebview is a lightweight cross-platform wrapper around a webview component that allows to display HTML content in its o

Roman 3.3k Jan 01, 2023
python+PySimpleGUI+pyserial+threading

GUI_pyserial python+PySimpleGUI+pyserial+threading 功能 1.利用PySimpleGUI制作图形用户界面 2.利用threading实现多线程调用pyserial处理串口通信 模块版本 PySimpleGUI 4.46.0 pyserial 3.5

2 Dec 27, 2022