Skip to main content

Python bindings for Wry/Tao

Project description

Wry Py

Python bindings for Wry for building desktop apps with webviews.

Install

pip install wry_py

Linux needs GTK/WebKitGTK:

# Debian/Ubuntu
sudo apt install libgtk-3-dev libwebkit2gtk-4.1-dev

# Arch
sudo pacman -S gtk3 webkit2gtk-4.1

Quick Start

from wry_py import UiWindow, div, text, button

count = 0

def increment():
    global count
    count += 1
    render()

def render():
    root = (
        div()
        .size_full()
        .v_flex()
        .items_center()
        .justify_center()
        .gap(20)
        .child_builder(text(f"Count: {count}").text_size(32))
        .child_builder(
            button("Increment")
            .padding(10, 20)
            .bg("#3b82f6")
            .text_color("#fff")
            .on_click(increment)
        )
        .build()
    )
    window.set_root(root)

window = UiWindow(title="Counter", width=400, height=300)
render()
window.run()

Examples

# Counter
python -m examples.counter

# Todo list with dialogs
python -m examples.todo_list

# Hover, focus, and transitions
python -m examples.styles

Development

git clone https://github.com/Jacob-Walton/wry_py.git
cd wry_py
pip install maturin
maturin develop --release

Docs

https://jacob-walton.github.io/wry_py/

License

MIT

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

wry_py-0.1.6.tar.gz (33.6 kB view details)

Uploaded Source

Built Distributions

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

wry_py-0.1.6-cp314-cp314-win_amd64.whl (555.9 kB view details)

Uploaded CPython 3.14Windows x86-64

wry_py-0.1.6-cp314-cp314-win32.whl (511.8 kB view details)

Uploaded CPython 3.14Windows x86

wry_py-0.1.6-cp314-cp314-macosx_11_0_arm64.whl (804.9 kB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

wry_py-0.1.6-cp314-cp314-macosx_10_12_x86_64.whl (825.5 kB view details)

Uploaded CPython 3.14macOS 10.12+ x86-64

wry_py-0.1.6-cp313-cp313-win_amd64.whl (565.1 kB view details)

Uploaded CPython 3.13Windows x86-64

wry_py-0.1.6-cp313-cp313-macosx_11_0_arm64.whl (809.8 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

wry_py-0.1.6-cp313-cp313-macosx_10_12_x86_64.whl (834.4 kB view details)

Uploaded CPython 3.13macOS 10.12+ x86-64

wry_py-0.1.6-cp312-cp312-win_amd64.whl (565.2 kB view details)

Uploaded CPython 3.12Windows x86-64

wry_py-0.1.6-cp312-cp312-macosx_11_0_arm64.whl (809.9 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

wry_py-0.1.6-cp312-cp312-macosx_10_12_x86_64.whl (834.4 kB view details)

Uploaded CPython 3.12macOS 10.12+ x86-64

wry_py-0.1.6-cp311-cp311-win_amd64.whl (565.1 kB view details)

Uploaded CPython 3.11Windows x86-64

wry_py-0.1.6-cp311-cp311-macosx_11_0_arm64.whl (810.0 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

wry_py-0.1.6-cp311-cp311-macosx_10_12_x86_64.whl (834.4 kB view details)

Uploaded CPython 3.11macOS 10.12+ x86-64

wry_py-0.1.6-cp310-cp310-win_amd64.whl (564.5 kB view details)

Uploaded CPython 3.10Windows x86-64

File details

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

File metadata

  • Download URL: wry_py-0.1.6.tar.gz
  • Upload date:
  • Size: 33.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.10.2

File hashes

Hashes for wry_py-0.1.6.tar.gz
Algorithm Hash digest
SHA256 cfcbf4743f3176c12b7088e9eb8651ed24c9393ce82bdcead9640606bafab5e5
MD5 08f60cdfd7955c3475c10b8243eca853
BLAKE2b-256 25efbede872e3cc9bd97f7f6a9e4256560b0a1e09a26565ec19e7963ccbf43df

See more details on using hashes here.

File details

Details for the file wry_py-0.1.6-cp314-cp314-win_amd64.whl.

File metadata

  • Download URL: wry_py-0.1.6-cp314-cp314-win_amd64.whl
  • Upload date:
  • Size: 555.9 kB
  • Tags: CPython 3.14, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.10.2

File hashes

Hashes for wry_py-0.1.6-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 c96943e35ec00bf953d153e2ff1c97391e4bfc30bee7f6e152f1e5941408ba14
MD5 6a720428aff632daf4f51b0a8eac17fa
BLAKE2b-256 555c28b74f9a944235cc3fba9da6b0e890e3689e0b32fd2dc351c50a150e5d40

See more details on using hashes here.

File details

Details for the file wry_py-0.1.6-cp314-cp314-win32.whl.

File metadata

  • Download URL: wry_py-0.1.6-cp314-cp314-win32.whl
  • Upload date:
  • Size: 511.8 kB
  • Tags: CPython 3.14, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.10.2

File hashes

Hashes for wry_py-0.1.6-cp314-cp314-win32.whl
Algorithm Hash digest
SHA256 0115923f69260ec0bd7013f4c1cbfa3614b80158a631590320464c74e2e95d82
MD5 b413fd6359581d265ff666e3dced5016
BLAKE2b-256 cda60cccaa303f9ea7b25c23015d72cdabdae6e280a310820c81cb256f3fe17d

See more details on using hashes here.

File details

Details for the file wry_py-0.1.6-cp314-cp314-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for wry_py-0.1.6-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 55058a5f414b87c69a873ef8336bbe5cf3c07d0426ee2f8d2ba97a63b0913a05
MD5 c5dbe29c66efaee40187fbf163820c04
BLAKE2b-256 e52dff78075f33ca59cd00bdf21af5214f21d4d569f04e0a94e1587f8f359938

See more details on using hashes here.

File details

Details for the file wry_py-0.1.6-cp314-cp314-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for wry_py-0.1.6-cp314-cp314-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 f331c29289228b1ac19f7235b069c420aa722d0fe3a4f558be528deadfded7bb
MD5 557c259bbc55e7f40d79dfa21678b12f
BLAKE2b-256 ac60646d930771dd2ed8a7f739cc09837e90799be71182293d53b508f944398c

See more details on using hashes here.

File details

Details for the file wry_py-0.1.6-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: wry_py-0.1.6-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 565.1 kB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.10.2

File hashes

Hashes for wry_py-0.1.6-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 6e5efa5030f799aa2e5e58e92e7939454a4eb176dff71b6a015cc8c548022e07
MD5 4f09638f5d71ecd3ad37e5ab898878a6
BLAKE2b-256 d85343561454a5362f4049489402cbec6afb793e426931930bc2bd60b37bf12e

See more details on using hashes here.

File details

Details for the file wry_py-0.1.6-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for wry_py-0.1.6-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e0bb3caf2cc0cfe7c81ac3a0769c31482a230ef7def4283a6aee2dc7fd6cca50
MD5 1a9eaf4edd65c9a569b4c51040a4c7c5
BLAKE2b-256 5374f3f52980766914531e86e8798ffad631f68a4cd81793bac0e0e207ec5466

See more details on using hashes here.

File details

Details for the file wry_py-0.1.6-cp313-cp313-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for wry_py-0.1.6-cp313-cp313-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 d32e60a51609fe2f0a04b82d80eaf7592f17ce3dd285c753c0facf5c0af87333
MD5 27cca488c6f43bd39b1daec09451ddf9
BLAKE2b-256 9c07e2e1d989f51a56445e7c1bcf928f049218492d9bd56211decfe54aa2f27f

See more details on using hashes here.

File details

Details for the file wry_py-0.1.6-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: wry_py-0.1.6-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 565.2 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.10.2

File hashes

Hashes for wry_py-0.1.6-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 9da6925ae0333ce380953b97c4e50c4ab5a4b503810767d4d26efff702a6e1ef
MD5 2aaf768d985f0691dd1a2890ccb0d519
BLAKE2b-256 03d224d53d310f775ed7bf7c528841c064f58fba026f8b5234c15a8500850573

See more details on using hashes here.

File details

Details for the file wry_py-0.1.6-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for wry_py-0.1.6-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b342b1cdf006db72c8d3ae1cc4631621be7e6b6cf106485bbfa28334f9119595
MD5 cdfed4d860d9f471dd88ce4915d0110d
BLAKE2b-256 c4443172559f27464b88a4b379744bd9f9483fc665451b55854812259639b4de

See more details on using hashes here.

File details

Details for the file wry_py-0.1.6-cp312-cp312-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for wry_py-0.1.6-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 5eaa306d471ee397201330a8781a8c177786911da756f36424c41408b2057b39
MD5 250de5d35a1e86ee81a6a463245dbb89
BLAKE2b-256 f16c429b17e4ff34b6a36c24e18667030121227a2e30fa92658d3b843ce6fc9f

See more details on using hashes here.

File details

Details for the file wry_py-0.1.6-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: wry_py-0.1.6-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 565.1 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.10.2

File hashes

Hashes for wry_py-0.1.6-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 7c6b809e8b23478aa26aa40bd0bf8b6665ea6354c51a7b7ecd90494138f4fcea
MD5 b5df751a2e0fc8d980593a2f916b006b
BLAKE2b-256 7d0d50e7f60e9a7f8d60f46d487608dd751add542d97c80c4552aa212348d6ee

See more details on using hashes here.

File details

Details for the file wry_py-0.1.6-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for wry_py-0.1.6-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 83d14cb72202c131571be3c1348027f05f283a44c06f82fdbbfadb549f10e3c9
MD5 1d2c2fb5f40232da3c94de5566f83fb4
BLAKE2b-256 5000c4600cafdb52a3700d2c2888bdd7216a512d1b85094e504fb976095a0e58

See more details on using hashes here.

File details

Details for the file wry_py-0.1.6-cp311-cp311-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for wry_py-0.1.6-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 4ecae011b2418f304b2288f312fdc6b7399c8c248bd85f258c9c237875bda130
MD5 bbee7f4226a5faaee52dc03a26cc717a
BLAKE2b-256 8400aaae1356feec48d2cc3032e2887a207a665efebc08afcc0c0e6dec36553a

See more details on using hashes here.

File details

Details for the file wry_py-0.1.6-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: wry_py-0.1.6-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 564.5 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.10.2

File hashes

Hashes for wry_py-0.1.6-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 6147a9598e9acf75f0711ec00898ba613e09a3aed55e3e33cceecf8c5656be87
MD5 3754de824a6c3e6e32280f7800832205
BLAKE2b-256 1ec819de36340b6d6f5eff3839bceee491c9745c90865fce665fd9938edbe400

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