{"id":13857090,"url":"https://github.com/manatlan/wuy","last_synced_at":"2025-07-31T13:10:18.282Z","repository":{"id":57477840,"uuid":"141731577","full_name":"manatlan/wuy","owner":"manatlan","description":"[DEPRECATED] use GUY !!!","archived":false,"fork":false,"pushed_at":"2020-02-12T21:19:16.000Z","size":312,"stargazers_count":72,"open_issues_count":4,"forks_count":7,"subscribers_count":11,"default_branch":"master","last_synced_at":"2024-10-09T12:27:53.356Z","etag":null,"topics":["aiohttp","asyncio","gui","html","javascript","python","server","websocket"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/manatlan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-07-20T15:57:26.000Z","updated_at":"2024-03-30T22:47:45.000Z","dependencies_parsed_at":"2022-09-10T04:23:53.093Z","dependency_job_id":null,"html_url":"https://github.com/manatlan/wuy","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manatlan%2Fwuy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manatlan%2Fwuy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manatlan%2Fwuy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manatlan%2Fwuy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/manatlan","download_url":"https://codeload.github.com/manatlan/wuy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245919570,"owners_count":20693910,"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":["aiohttp","asyncio","gui","html","javascript","python","server","websocket"],"created_at":"2024-08-05T03:01:25.446Z","updated_at":"2025-03-29T21:31:07.473Z","avatar_url":"https://github.com/manatlan.png","language":"Python","readme":"# wuy \n\n----\n**wuy is dead (no more supported)**; You should go to [GUY](https://github.com/manatlan/guy) (it's available !)\n----\n\nIf you have made a _super python tool_, and you want to add a GUI but without using qt/gtk/tk/wx/kivy/toga : you are in the right place ! Just re-use the local browser (chrome in app mode) as GUI, drived by **wuy**.\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://github.com/manatlan/wuy/blob/master/wiki/capture.png\"/\u003e\u003cbr/\u003e\n    \u003ca href=\"https://github.com/manatlan/wuy/blob/master/web/askName.html\"\u003ehtml\u003c/a\u003e / \n    \u003ca href=\"https://github.com/manatlan/wuy/blob/master/an_app2.py\"\u003epython\u003c/a\u003e\n\u003c/p\u003e\n\nBasically, it's a python module which will act as a web server (http \u0026 websocket) and will open/manage a window for you ; providing a simple framework (js/py3 helpers).\n\nIt lets you create your GUI with yours web skills (html/js/css or any js frameworks/libs), and re-use the power of python on server side.\n\nTechnically, it's a python3 module, using asyncio and the marvellous [aiohttp](https://aiohttp.readthedocs.io/en/stable/), and (if present) the [uvloop](https://magic.io/blog/uvloop-blazing-fast-python-networking/), for the full speed ! The http server is here to serve static content (html, js, images ...). The websocket is here to simplify the communication (sync/async) between the window \u0026 the server. (rpc method to communicate from client to server, pubsub mechanism to communicate from server to clients, or from client to clients)\n\nIn **app/window mode** : it will manage (open/close) the window for you ; using the **chrome app mode** ; if the websocket brokes : window \u0026 server will shutdown (close the window ; the server will shutdown, close the server ; the window will shutdown). You (or your clients) will not see a difference with classical GUI !\n\nIn **server mode** : it will act as a classical web server ; and you can use as many clients/browsers as you want, from localhost or from anywhere else. Closing a socket ; just close the socket ;-). It can be hosted on the web, as long as the provider service use python3.\n\n[More on window/server differences](https://github.com/manatlan/wuy/blob/master/wiki/diff.md)\n\nIn all cases : it will be pretty easy to produce/freeze an executable (windows/linux/apple) (one file with all html/js embedded), using [pyinstaller/windows](https://github.com/manatlan/wuy/blob/master/BUILD.bat). And share your _super python tool_ to the world (wuy comes with [its own freezer (a wuy app !)](https://github.com/manatlan/wuy/tree/master/examples/wuy_freezer))! And in the future : android !\n\nSince 0.6; **wuy** provide a js method to [proxify http requests](https://github.com/manatlan/wuy/blob/master/wiki/proxify.md), to avoid CORS troubles.\n\nSince 0.9; **wuy** provide get/set methods on client/server side to store/retrieve key/value pairs in a json file on serverside.\n\nIt's, a little bit, the same thing as [python eel](https://github.com/ChrisKnott/Eel).\n\n\n\n**TODOs**:\n* In the future : [cefpython3](https://github.com/cztomczak/cefpython) will be the platform of choice for running **wuy** apps on **android**/iphone (when [cef](https://bitbucket.org/chromiumembedded/cef/issues/1991/add-android-support) and [cefpython3](https://github.com/kivy-garden/garden.cefpython/issues/8) will be ready). Currently **wuy** works with cefpython3, on linux/windows/apple. It's working in the [unittests suite](https://github.com/manatlan/wuy/blob/master/wuy_tests.py) (you can already try ; modify _wuy.py_, replace ChromeApp() by ChromeAppCef())\n* Write docs \u0026 examples\n\n## The simplest example\nThis is _the hello world_ of **wuy**\n\n```python\nimport wuy\n\nclass helloWorld(wuy.Window):\n    \"\"\" \u003cbutton onclick=\"wuy.beep()\"\u003eBEEP\u003c/button\u003e \"\"\"\n    size=(100,100)\n\n    def beep(self):\n        print(\"\\a BEEP !!!\")\n\nhelloWorld()\n```\n\n## To Test/Run\n\nDownload [the zip from here](https://github.com/manatlan/wuy/archive/master.zip)\n\n    $ pip3 install aiohttp winreg\n    $ python3 -u an_app.py\n\n(_winreg_ is needed for windows only)\n\nIt's an app !\n\nFor a regular server example (many clients from anywhere on web)\n\n    $ python3 -u a_server.py\n\n## To Use\n\nInstall the lib :\n\n    $ pip3 install wuy winreg\n\n(_winreg_ is needed for windows only)\n\n**And follow the [official tuto](https://github.com/manatlan/wuy/blob/master/wiki/README.md)**.\n\n\n## See Examples\n\n* [an_app](https://github.com/manatlan/wuy/blob/master/an_app.py) : all kind of tricks\n* [an_app2](https://github.com/manatlan/wuy/blob/master/an_app2.py) : an input box\n* [an_app3](https://github.com/manatlan/wuy/blob/master/an_app3.py) : an alert box with autodeclared js vars (chain'able windows)!\n* [an_app4](https://github.com/manatlan/wuy/blob/master/an_app4.py) : using sync \u0026 async rpc calls !\n* [an_app5](https://github.com/manatlan/wuy/blob/master/an_app5.py) : using async aiohttp.get (request content from web) \u0026 FULLSCREEN mode\n* [an_app6](https://github.com/manatlan/wuy/blob/master/an_app6.py) : progress bars (async)\n* [an_app7](https://github.com/manatlan/wuy/blob/master/an_app7.py) : html is inside the docstring ! (**SIMPLEST**)\n* [an_app8](https://github.com/manatlan/wuy/blob/master/an_app8.py) : just to show how to organize your code when app's expand.\n* [an_appVuejs](https://github.com/manatlan/wuy/blob/master/an_appVuejs.py) : using a vuejs app (and  a continuous push from server to client)\n* [a_server](https://github.com/manatlan/wuy/blob/master/a_server.py) : a server, tchat service for multiple clients\n* [an_upload](https://github.com/manatlan/wuy/blob/master/an_upload.py) : a drag'n'drop upload to server example.\n\nDon't forget to have a look at [real examples](https://github.com/manatlan/wuy/tree/master/examples) too (real apps for real life)\n\nA big real life app : See [jBrout3](https://github.com/manatlan/jbrout3) (in development), it's the rebirth of the good old py2/gtk app : [jBrout2](https://jbrout.manatlan.com). It use vuejs/vuex for front, and the jbrout's lib to manage photos.\n\n\n## Doc\n\nUse [wuy.Window](https://github.com/manatlan/wuy/blob/master/wiki/api_py_window.md) for app (which open/manage a chrome window app)\n\nUse [wuy.Server](https://github.com/manatlan/wuy/blob/master/wiki/api_py_server.md) for classic http/ws servers\n\nAnd client side (javascript), in all cases : use [wuy.js](https://github.com/manatlan/wuy/blob/master/wiki/api_js.md)\n\n[Learn More on differences between this two class](https://github.com/manatlan/wuy/blob/master/wiki/diff.md)\n","funding_links":[],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanatlan%2Fwuy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmanatlan%2Fwuy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanatlan%2Fwuy/lists"}