Skip to main content

applepy

Applepy is a UI library inspired by Swift UI that leverages AppKit and UIKit to create native MacOS, iOS and iPadOS user interfaces in the Python programming language with a declarative syntax.

This project is at proof of concept stage and is not feature complete. Please do not use it in production.

Dependencies

Installation

The latest version is available for installation in PyPI:

pip install applepy-ui

Usage

class Sample(App):
    def body(self) -> Scene:
        with Window(title='Applepy example', size=Size(640, 100)) as w:
            with VerticalStack():
                with HorizontalStack():
                    Label(text='Hello')
                    Label(text='World')
                
            return w.center()
Sample().run()

image

It also works on mobile:

class MobileSample(App):
    def body(self):
        with SimpleScreen() as s:
            with HorizontalStack():
                with VerticalStack():
                    Label(text='Hello World')
            return s

def main():
    sys.exit(MobileSample().run())

Events can be handled synchronously and asynchronously in the same context:

class AsyncSample(App):
    def clicked(self) -> None:
        time.sleep(2)
        Alert.show_info(informative_text='Hello', message_text='Synchronous World')

    async def clicked_async(self) -> None:
        await asyncio.sleep(2)
        Alert.show_info(informative_text='Hello', message_text='Asynchronous World')

    def body(self) -> Scene:
        with Window(title='Applepy async example', size=Size(640,480)) as w:
            with HorizontalStack():
                with VerticalStack():
                    Button(title='Sync action', action=self.clicked)
                    Button(title='Async action', action=self.clicked_async)
                return w.center()

AsyncSample().run_async()

For a more complete example, please check example.py

Metadata

Release files for applepy-ui 0.0.5

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

Source distribution (sdist)

Source distribution for applepy-ui 0.0.5
File Size Uploaded Provenance Actions
applepy-ui-0.0.5.tar.gz 38.1 kB Without provenance Details for applepy-ui-0.0.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for applepy-ui 0.0.5
File Interpreter ABI Platform Actions
applepy_ui-0.0.5-py3-none-any.whl Python 3 none any Details for applepy_ui-0.0.5-py3-none-any.whl

Total release size: 88.0 kB

Release files / applepy-ui-0.0.5.tar.gz

Download URL applepy-ui-0.0.5.tar.gz
Size 38.1 kB
Tags Source
SHA-256 checksum
How to use checksums
43ee056af28ea1cd59d9a5bebcf44e975281d1ef6f2f16f8b2c5c02fda9b9b97
BLAKE2b-256 checksum
How to use checksums
a90cf0caf3ca08cdb7c2c25d9ba5393e90d018b6b9797c06ffef44988104119c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.13

Release files / applepy_ui-0.0.5-py3-none-any.whl

Download URL applepy_ui-0.0.5-py3-none-any.whl
Size 49.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d1dab8d5f5e24715af0b63a4c8fd7eb44d869800d4f7a4b22a889d128e170128
BLAKE2b-256 checksum
How to use checksums
f06309db224db50f56c681b5f634295dfa372becf28b10b651d0699053372c9c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.13

Security for applepy-ui 0.0.5

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