Skip to main content

Like python eel, but for py3, with asyncio

Project description

wuy

It's like python eel BUT :

  • it's not as polished
  • it uses python3 ONLY
  • it uses asyncio, and the marvellous aiohttp
  • it's server hosted friendly from scratch
  • it uses pubsub mechanism to communicate from server to clients, or from client to clients
  • it's not pyinstaller-friendly for now
  • com errors are catch'able thru the promise

it's a proof of concept : WUY means Web User Ynterface ...

to test/run

Download the zip from here

$ pip3 install aiohttp
$ python3 -u server.py

to use

Install the lib :

$ pip3 install wuy

create a python file "web.py", and copy/paste this:

import wuy
wuy.start(app=True)

Run it, like this :

python3 web.py

It will create a "web/index.html", the defaut front-end ;-)

Edit "web/index.html", like this :

<script src="wuy.js"></script>
<button onclick="wuy.myadd(42,13).then( alert )">test</button>

Edit "web.py", like this :

import wuy

@wuy.expose
def myadd(a,b):
    return a+b

wuy.start(app=(640,480))

and rerun your script :

python3 web.py

and you can start to code

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wuy-0.1.8.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wuy-0.1.8-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file wuy-0.1.8.tar.gz.

File metadata

  • Download URL: wuy-0.1.8.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for wuy-0.1.8.tar.gz
Algorithm Hash digest
SHA256 5e3f6eb989f4fe53ba090e9d5d402797de8d7ac6bcc8316412ec0833f62ea4e8
MD5 cb5141ef69262d0a4e82544679e0935f
BLAKE2b-256 649baf53cff088d0c595fc0e640eb4aa927f09960bba140dd529fa5f83e812b1

See more details on using hashes here.

File details

Details for the file wuy-0.1.8-py3-none-any.whl.

File metadata

  • Download URL: wuy-0.1.8-py3-none-any.whl
  • Upload date:
  • Size: 7.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for wuy-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 c07e112df1f6806b8354dbc641dbb86dabb646a4e5b95900a01ad03ac440b787
MD5 8fa3cc839599232973324c8a13362d4c
BLAKE2b-256 af97c869e8fa42198c3aa55a69b0c3b5e00374d47a1ab8f26293091fd7d1e3da

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page