{"id":13419698,"url":"https://github.com/rawpython/remi","last_synced_at":"2025-12-12T01:01:53.252Z","repository":{"id":15209818,"uuid":"17938217","full_name":"rawpython/remi","owner":"rawpython","description":"Python REMote Interface library. Platform independent. In about 100 Kbytes, perfect for your diet.","archived":false,"fork":false,"pushed_at":"2023-12-27T11:24:37.000Z","size":4459,"stargazers_count":3518,"open_issues_count":101,"forks_count":404,"subscribers_count":122,"default_branch":"master","last_synced_at":"2024-10-29T15:05:08.373Z","etag":null,"topics":["gui","gui-library","platform-independent","python","remi","ui"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rawpython.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null},"funding":{"github":["dddomodossola"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2014-03-20T10:12:11.000Z","updated_at":"2024-10-28T16:04:56.000Z","dependencies_parsed_at":"2024-04-16T22:03:20.605Z","dependency_job_id":null,"html_url":"https://github.com/rawpython/remi","commit_stats":{"total_commits":1218,"total_committers":57,"mean_commits":21.36842105263158,"dds":"0.33333333333333337","last_synced_commit":"c6a61daf929ded2400e82082805817ad51539eab"},"previous_names":["dddomodossola/remi"],"tags_count":24,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rawpython%2Fremi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rawpython%2Fremi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rawpython%2Fremi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rawpython%2Fremi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rawpython","download_url":"https://codeload.github.com/rawpython/remi/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248154433,"owners_count":21056539,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gui","gui-library","platform-independent","python","remi","ui"],"created_at":"2024-07-30T22:01:19.519Z","updated_at":"2025-12-12T01:01:50.388Z","avatar_url":"https://github.com/rawpython.png","language":"Python","readme":"[![Build Status](https://travis-ci.com/dddomodossola/remi.svg?branch=master)](https://travis-ci.com/dddomodossola/remi)\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://raw.githubusercontent.com/rawpython/remi/master/remi/res/logo.png\" width=\"430\"\u003e\n\u003c/p\u003e\n\n\u003ch2 align=\"center\" style=\"font-weight:bolder\"\u003e\n    GUI library for your Python applications\n\u003c/h2\u003e\n\n\u003cp align=\"center\" style=\"white-space:pre\"\u003e\nRemi is a GUI library for Python applications that gets rendered in web browsers.\nThis allows you to access your interface locally and remotely.\n\u003c/p\u003e\n\n\nProud to be sponsored by\n===\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://www.simracingstudio.com/\" style=\"font-size:25px\" \u003e\n\u003cimg src=\"https://static.wixstatic.com/media/092827_44a73f6751144b85af49c280304c9f25~mv2.png/v1/crop/x_0,y_37,w_4349,h_2313/fill/w_155,h_83,al_c,q_85,usm_0.66_1.00_0.01/srs-logo-whitebackground-slogan.webp\" width=\"250\"\u003e\n\u003c/a\u003e\n\u003cp\u003e\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://github.com/PySimpleGUI\" style=\"font-size:25px;right:0px;\"\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/PySimpleGUI/PySimpleGUI/master/images/for_readme/Logo%20with%20text%20for%20GitHub%20Top.png\" width=\"200\"\u003e\n\u003c/a\u003e\n\u003cp\u003e\n\nDo you need support?\n===\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://www.reddit.com/r/RemiGUI\" style=\"font-size:25px\"\u003eReddit - (subreddit RemiGUI)\u003c/a\u003e\n\u003c/p\u003e\n\n\nThere is also a **drag n drop GUI Editor**. Look at the [Editor](https://github.com/rawpython/remi/tree/master/editor) subfolder to download your copy.\n\n\u003ca href=\"https://vimeo.com/517626422\" style=\"font-size:25px\"\u003eA demonstrative video from the great REVVEN labs\u003c/a\u003e\n\n\u003cp align=\"center\"\u003e\n\n\nGetting Started\n===\nFor a **stable** version:\n```\npip install remi\n```\n\nFor the most updated **experimental** version [Download](https://github.com/rawpython/remi/archive/master.zip) or check out Remi from git and install\n\n```\npython setup.py install\n```\nor install directly using pip\n\n```\npip install git+https://github.com/rawpython/remi.git\n```\n\nThen start the test script (download it from github https://github.com/rawpython/remi/blob/master/examples/widgets_overview_app.py):\n```\npython widgets_overview_app.py\n```\n\n\nRemi\n===\nPlatform independent Python GUI library. In less than 100 Kbytes of source code, perfect for your diet.\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://raw.githubusercontent.com/rawpython/remi/development/remi/res/screenshot.png\" title=\"Widgets overview\"\u003e\n\u003c/p\u003e\n\nRemi enables developers to create platform independent GUI with Python. The entire GUI is rendered in your browser. **No HTML** is required, Remi automatically translates your Python code into HTML. When your app starts, it starts a web server that will be accessible on your network.\n\nA basic application appears like this:\n\n```py\nimport remi.gui as gui\nfrom remi import start, App\n\nclass MyApp(App):\n    def __init__(self, *args):\n        super(MyApp, self).__init__(*args)\n\n    def main(self):\n        container = gui.VBox(width=120, height=100)\n        self.lbl = gui.Label('Hello world!')\n        self.bt = gui.Button('Press me!')\n\n        # setting the listener for the onclick event of the button\n        self.bt.onclick.do(self.on_button_pressed)\n\n        # appending a widget to another, the first argument is a string key\n        container.append(self.lbl)\n        container.append(self.bt)\n\n        # returning the root widget\n        return container\n\n    # listener function\n    def on_button_pressed(self, widget):\n        self.lbl.set_text('Button pressed!')\n        self.bt.set_text('Hi!')\n\n# starts the web server\nstart(MyApp, port=8081)\n```\n\nIn order to see the user interface, open your preferred browser and type \"http://127.0.0.1:8081\".\nYou can change the URL address by specific **kwargs at `start` function call. This will be discussed later.\n\nTested on Android, Linux, Windows.\nUseful on Raspberry Pi for Python script development. It allows interacting with your Raspberry Pi remotely from your mobile device.\n\n\nFAQ\n===\n- **Why another GUI lib?**\nKivy, PyQT, and PyGObject all require native code for the host operating system, which means installing or compiling large dependencies. Remi needs only a web browser to show your GUI.\n\n- **Do I need to know HTML?**\nNO, It is not required, you have to code only in Python.\n\n- **Is it open source?**\nFor sure! Remi is released under the Apache License. See the ``LICENSE`` file for more details.\n\n- **Do I need some kind of web server?**\nNo, it's included.\n\n\nBrief tutorial\n===\nImport Remi library and some other useful stuff.\n\n```py\nimport remi.gui as gui\nfrom remi import start, App\n```\n\nSubclass the `App` class and declare a `main` function that will be the entry point of the application. Inside the main function you have to \u003ccode\u003ereturn\u003c/code\u003e the root widget.\n\n```py\nclass MyApp(App):\n    def __init__(self, *args):\n        super(MyApp, self).__init__(*args)\n\n    def main(self):\n        lbl = gui.Label(\"Hello world!\", width=100, height=30)\n\n        # return of the root widget\n        return lbl\n```\n\nOutside the main class, start the application by calling the function `start` and passing the name of the class you declared previously as the parameter:\n\n```py\n# starts the webserver\nstart(MyApp, port=8081)\n```\n\nRun the script. If it's all OK the GUI will be opened automatically in your browser, otherwise, you have to type in the address bar \"http://127.0.0.1:8081\".\n\nYou can customize optional parameters in the `start` call like:\n\n```py\nstart(MyApp, address='127.0.0.1', port=8081, multiple_instance=False, enable_file_cache=True, update_interval=0.1, start_browser=True, dynamic_web_address=True)\n```\n\nParameters:\n- address: network interface IP\n- port: listen port\n- multiple_instance: boolean, if True multiple clients that connect to your script has different App instances (identified by unique cookie session identifier)\n- enable_file_cache: boolean, if True enable resource caching\n- update_interval: GUI update interval in seconds. If zero, the update happens at each change. If zero, the App.idle method is not called.\n- start_browser: boolean that defines if the browser should be opened automatically at startup\n- standalone: boolean, indicates where to run the application as a standard Desktop application with its own window. If False, the interface is shown in a browser webpage.\n\nAdditional Parameters:\n- username: for a basic HTTP authentication\n- password: for a basic HTTP authentication\n- certfile: SSL certificate filename\n- keyfile: SSL key file\n- ssl_version: authentication version (i.e. ssl.PROTOCOL_TLSv1_2). If None disables SSL encryption\n- dynamic_web_address: set it to `True` if the server is not aware of the IP address and the URL the user will be opening the app with.\nIf so, the JavaScript code will use hostname and port in the browser. This parameter is `False` by default.\n\nAll widgets constructors accept two standards**kwargs that are:\n- width: can be expressed as int (and is interpreted as a pixel) or as str (and you can specify the measuring unit like '10%')\n- height: can be expressed as int (and is interpreted as a pixel) or as str (and you can specify the measuring unit like '10%')\n\n\nEvents and callbacks\n===\nWidgets expose a set of events that happen during user interaction.\nSuch events are a convenient way to define the application behavior.\nEach widget has its own callbacks, depending on the type of user interaction it allows.\nThe specific callbacks for the widgets will be illustrated later.\n\nIn order to register a function as an event listener you have to call a function like eventname.do (i.e. onclick.do) passing as parameters the callback that will manage the event.\nFollows an example:\n\n```py\nimport remi.gui as gui\nfrom remi import start, App\n\nclass MyApp(App):\n    def __init__(self, *args):\n        super(MyApp, self).__init__(*args)\n\n    def main(self):\n        container = gui.VBox(width=120, height=100)\n        self.lbl = gui.Label('Hello world!')\n        self.bt = gui.Button('Press me!')\n\n        # setting the listener for the onclick event of the button\n        self.bt.onclick.do(self.on_button_pressed)\n\n        # appending a widget to another, the first argument is a string key\n        container.append(self.lbl)\n        container.append(self.bt)\n\n        # returning the root widget\n        return container\n\n    # listener function\n    def on_button_pressed(self, widget):\n        self.lbl.set_text('Button pressed!')\n        self.bt.set_text('Hi!')\n\n# starts the web server\nstart(MyApp)\n```\n\nIn the shown example *self.bt.onclick.do(self.on_button_pressed)* registers the self's *on_button_pressed* function as a listener for the event *onclick* exposed by the Button widget.\nSimple, easy.\n\nListener's callbacks will receive the emitter's instance firstly, then all other parameters provided by the specific event.\n\n\nBesides the standard event registration (as aforementioned), it is possible to pass user parameters to listener functions. This can be achieves appending parameters to the *do* function call.\n\n```py\nimport remi.gui as gui\nfrom remi import start, App\n\nclass MyApp(App):\n    def __init__(self, *args):\n        super(MyApp, self).__init__(*args)\n\n    def main(self):\n        container = gui.VBox(width=120, height=100)\n        self.lbl = gui.Label('Hello world!')\n        self.bt = gui.Button('Hello name!')\n        self.bt2 = gui.Button('Hello name surname!')\n\n        # setting the listener for the onclick event of the buttons\n        self.bt.onclick.do(self.on_button_pressed, \"Name\")\n        self.bt2.onclick.do(self.on_button_pressed, \"Name\", \"Surname\")\n\n        # appending a widget to another\n        container.append(self.lbl)\n        container.append(self.bt)\n        container.append(self.bt2)\n\n        # returning the root widget\n        return container\n\n    # listener function\n    def on_button_pressed(self, widget, name='', surname=''):\n        self.lbl.set_text('Button pressed!')\n        widget.set_text('Hello ' + name + ' ' + surname)\n\n# starts the web server\nstart(MyApp)\n```\n\nThis allows great flexibility, getting different behaviors with the same event listener definition.\n\n\nHTML Attribute accessibility\n===\nSometimes it is required to access Widget's HTML representation in order to manipulate HTML attributes.\nThe library allows accessing this information easily.\n\nA simple example: It is the case where you would like to add a hover text to a widget. This can be achieved by the *title* attribute of an HTML tag.\nIn order to do this:\n\n```py\n    widget_instance.attributes['title'] = 'Your title content'\n```\n\nA special case of HTML attribute is the *style*.\nThe style attributes can be altered in this way:\n\n```py\n    widget_instance.style['color'] = 'red'\n```\n\nThe assignment of a new attribute automatically creates it.\n\nFor a reference list of HTML attributes, you can refer to https://www.w3schools.com/tags/ref_attributes.asp\n\nFor a reference list of style attributes, you can refer to https://www.w3schools.com/cssref/default.asp\n\nTake care about internally used attributes. These are:\n- **class**: It is used to store the Widget class name for styling purpose\n- **id**: It is used to store the instance id of the widget for callback management\n\n\nRemote access\n===\nIf you are using your REMI app remotely, with a DNS and behind a firewall, you can specify special parameters in the `start` call:\n- **port**: HTTP server port. Don't forget to NAT this port on your router;\n- **dynamic_web_address**: set to `True` if the JavaScript code should use the actual URL's host and port for connecting back to the app, instead of provided IP address. This parameter is `False` by default.\n\n```py\nstart(MyApp, address='0.0.0.0', port=8081, dynamic_web_address=True)\n```\n\n\nStandalone Execution\n===\nI suggest using the browser as a standard interface window.\n\nHowever, you can avoid using the browser.\nThis can be simply obtained joining REMI and [PyWebView](https://github.com/r0x0r/pywebview).\nHere is an example about this [standalone_app.py](https://github.com/rawpython/remi/blob/development/examples/standalone_app.py).\n\n**Be aware that PyWebView uses qt, gtk and so on to create the window. An outdated version of these libraries can cause UI problems. If you experience UI issues, update these libraries, or better avoid standalone execution.**\n\n\nAuthentication\n===\nIn order to limit remote access to your interface, you can define a username and password. It consists of a simple authentication process.\nJust define the parameters **username** and **password** in the start call:\n```py\nstart(MyApp, username='myusername', password='mypassword')\n```\n\n\nStyling\n===\nIn order to define a new style for your app, you have to do the following.\nCreate a *res* folder and pass it to your App class constructor:\n```python\nclass MyApp(App):\n    def __init__(self, *args):\n        res_path = os.path.join(os.path.dirname(__file__), 'res')\n        super(MyApp, self).__init__(*args, static_file_path={'res':res_path})\n```\n\nCopy the standard style.css file from the remi folder and paste it inside your *res* folder. Edit it in order to customize.\nThis way the standard *style.css* file gets overridden by the one you created.\n\n\nCompatibility\n===\nRemi is made to be compatible from Python2.7 to Python3.X. Please notify compatibility issues.\n\n\nSecurity\n===\nRemi should be intended as a standard desktop GUI framework.\nThe library itself doesn't implement security strategies, and so it is advised to not expose its access to unsafe public networks.\n\nWhen loading data from external sources, consider protecting the application from potential javascript injection before displaying the content directly.\n\n\nProjects using Remi\n===\n[PySimpleGUI](https://github.com/PySimpleGUI/PySimpleGUI): Launched in 2018 Actively developed and supported. Supports tkinter, Qt, WxPython, Remi (in browser). Create custom layout GUI's simply. Python 2.7 \u0026 3 Support. 100+ Demo programs \u0026 Cookbook for rapid start. Extensive documentation.\n\n[App Template For REMI](https://github.com/cheak1974/remi-app-template): A really well written template for multiview applications.\n\n[Web based dynamic reconfigure for ROS robots](https://github.com/awesomebytes/web_dyn_reconf)\n\n[razmq](https://github.com/MrYsLab/razmq)\n\n[Espresso-ARM](http://hallee.github.io/espresso-arm/)\n\n[PiPresents](https://github.com/KenT2/pipresents-gapless)\n\n[The Python Banyan Framework](https://github.com/MrYsLab/python_banyan)\n\n[LightShowPi show manager](https://github.com/Chrispizzi75/ShowManager)\n\n[rElectrum](https://github.com/emanuelelaface/rElectrum): A powerful promising Electrum wallet manager for safe transactions.\n\nOther Implementations\n===\nListed here are other implementations of this library:\n- [**cremi**](https://github.com/cyberpro4/cremi): (WIP) developed for your C++ projects by [Claudio Cannatà](https://github.com/cyberpro4).\n","funding_links":["https://github.com/sponsors/dddomodossola"],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frawpython%2Fremi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frawpython%2Fremi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frawpython%2Fremi/lists"}