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.6.tar.gz (4.6 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.6-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for wuy-0.1.6.tar.gz
Algorithm Hash digest
SHA256 0ca1b09302c6f31112a6afa406fdbcd0f9ddc04cc59a077ca2e9be363ceb95b3
MD5 7c53e1ecff646cabe32c993919e60fd8
BLAKE2b-256 f333f1f7364287c7da5216795d53b2f2a68709a05969bf33156bdc2711367459

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for wuy-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 c3f8245321e54c8df156531d01ee8c0ba136487c3c41fc067511e3b44193c07d
MD5 00c3848103c44ee2d6da943515f01619
BLAKE2b-256 92e9c57ed03ed68f7e6d0fa2704982e345f9abe9f349d29e8783545dfec16a8c

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