Skip to main content

aiodesktop

Latest version on PyPi Supported Python versions CircleCI

A set of tools which simplify building cross-platform desktop apps with Python, JavaScript, HTML & CSS.

Features

In contrast to typical desktop GUI frameworks such as tkinter, wxPython, PyQt or Kivy:

  • does not define own widgets/layout system (Kivy, Qt, wx), simply use a browser as a platform which already provides those things
  • your app is client-server and cross-platform by design, different devices may use it simultaneously

Compared to existing alternatives such as Eel, async-eel and guy:

  • runs on asyncio instead of threads or gevent greenlets
  • highly customizable aiohttp server
  • no global state / singleton API

Install

Install from pypi with pip:

pip install aiodesktop

Hello, World!

import aiodesktop

class Server(aiodesktop.Server):
    async def on_startup(self):
        aiodesktop.launch_chrome(self.start_uri)

    # Use `expose` decorator to mark method as visible from JS
    @aiodesktop.expose
    async def get_string(self):
        # Use `await self.js.xxx()` to call JS functions from Python 
        return 'Hello, ' + await self.js.getWorld()

bundle = aiodesktop.Bundle()
server = Server(
    bundle=bundle,
    init_js_function='onConnect',
    index_html='''<html><body><script>
    async function onConnect(server) {                        
        // Exposing JS function to python        
        server.expose({
            async getWorld() {
                return 'World!'
            }
        });        

        // Use `await server.py.xxx()` to call Python methods from JS
        document.body.innerHTML += await server.py.get_string(); 
    };
</script></body></html>''',
)
server.run()

See example/ for a slightly more complicated app with:

  • static files
  • pyinstaller executable
  • JS & webpack
  • https

Metadata

Release files for aiodesktop 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aiodesktop 0.1.3
File Size Uploaded Provenance Actions
aiodesktop-0.1.3.tar.gz 15.0 kB Without provenance Details for aiodesktop-0.1.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for aiodesktop 0.1.3
File Interpreter ABI Platform Actions
aiodesktop-0.1.3-py3-none-any.whl Python 3 none any Details for aiodesktop-0.1.3-py3-none-any.whl

Total release size: 31.4 kB

Release files / aiodesktop-0.1.3.tar.gz

Download URL aiodesktop-0.1.3.tar.gz
Size 15.0 kB
Tags Source
SHA-256 checksum
How to use checksums
35dd3b41762ef300c3b07a865d5c43f2adfb36c4484a9e9bc792d92f3611f8e2
BLAKE2b-256 checksum
How to use checksums
c0c9ae48412c708a4fdfd0b519e9fb55811558cf2a73c1bd56ab9e1b1edf625a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/44.1.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.6

Release files / aiodesktop-0.1.3-py3-none-any.whl

Download URL aiodesktop-0.1.3-py3-none-any.whl
Size 16.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
92811ab960cf6cdefd4a0c5a051a76734a436051568257272acefe4f1f9f197a
BLAKE2b-256 checksum
How to use checksums
97c3b40e0bc30b743f9f44670c5c2438dcc428c12ce1c370a5ba017e4d2e1f41
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/44.1.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.6

Security for aiodesktop 0.1.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page