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.4.tar.gz (31.5 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.4-cp314-cp314-win_amd64.whl (545.2 kB view details)

Uploaded CPython 3.14Windows x86-64

wry_py-0.1.4-cp314-cp314-win32.whl (502.0 kB view details)

Uploaded CPython 3.14Windows x86

wry_py-0.1.4-cp314-cp314-macosx_11_0_arm64.whl (794.6 kB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

wry_py-0.1.4-cp314-cp314-macosx_10_12_x86_64.whl (813.2 kB view details)

Uploaded CPython 3.14macOS 10.12+ x86-64

wry_py-0.1.4-cp313-cp313-win_amd64.whl (551.4 kB view details)

Uploaded CPython 3.13Windows x86-64

wry_py-0.1.4-cp313-cp313-macosx_11_0_arm64.whl (799.5 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

wry_py-0.1.4-cp313-cp313-macosx_10_12_x86_64.whl (821.1 kB view details)

Uploaded CPython 3.13macOS 10.12+ x86-64

wry_py-0.1.4-cp312-cp312-win_amd64.whl (551.6 kB view details)

Uploaded CPython 3.12Windows x86-64

wry_py-0.1.4-cp312-cp312-macosx_11_0_arm64.whl (799.5 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

wry_py-0.1.4-cp312-cp312-macosx_10_12_x86_64.whl (821.1 kB view details)

Uploaded CPython 3.12macOS 10.12+ x86-64

wry_py-0.1.4-cp311-cp311-win_amd64.whl (551.6 kB view details)

Uploaded CPython 3.11Windows x86-64

wry_py-0.1.4-cp311-cp311-macosx_11_0_arm64.whl (800.1 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

wry_py-0.1.4-cp311-cp311-macosx_10_12_x86_64.whl (821.8 kB view details)

Uploaded CPython 3.11macOS 10.12+ x86-64

wry_py-0.1.4-cp310-cp310-win_amd64.whl (551.6 kB view details)

Uploaded CPython 3.10Windows x86-64

File details

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

File metadata

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

File hashes

Hashes for wry_py-0.1.4.tar.gz
Algorithm Hash digest
SHA256 f005bc234ed458332c0791e5e7febf5987987bbfc19eec0485b33a28ee1a737f
MD5 c4963c773e8336d391bd79aea0cb85f1
BLAKE2b-256 d2e746b2a87123281dab2c3e9ccb5805eef3559c9268f753fa5ebb3e8a2127fa

See more details on using hashes here.

File details

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

File metadata

  • Download URL: wry_py-0.1.4-cp314-cp314-win_amd64.whl
  • Upload date:
  • Size: 545.2 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.4-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 da7bb5c46a9aace3f40242481c78fc24b2a08995c685bb145cb3abdab63ebbe2
MD5 c07122428e4856fd5dd2613ddaf201ee
BLAKE2b-256 9c0d68b4f89064a770a5856505f0d6bd194464092a0941d9928a4303d1cbc24c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: wry_py-0.1.4-cp314-cp314-win32.whl
  • Upload date:
  • Size: 502.0 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.4-cp314-cp314-win32.whl
Algorithm Hash digest
SHA256 043af84e9adc9d5e751904f9e4222cb2f43815e23c65011b88c54f799e51e537
MD5 2b1ebeec24bbc5046574a6de54111dfb
BLAKE2b-256 2533906407a87b07e30e171d84f7d33082fdd6092631f455bd866a330d6de8c9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for wry_py-0.1.4-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c4593cc8a05dd25ccdd83b144227ff2b63932f55fb17502d91a92685dd81280a
MD5 6c0ab423cf7d4cfd693fe4daa45b2f85
BLAKE2b-256 b7078e9c2a6aa42ac00e6e94c17d92f890f7ec678384ede426868cf41e024746

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for wry_py-0.1.4-cp314-cp314-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 e7954f2f55d7c04d4cd34e374e13ab0ed94f79d6adcf4146bdccd34ef89c0894
MD5 dcae2e639738df9e8fb47d006dc24f0d
BLAKE2b-256 9e93f18005f6f96102624ecb70c24448300bb7ebbd13857a4d3a19f3b9bc4429

See more details on using hashes here.

File details

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

File metadata

  • Download URL: wry_py-0.1.4-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 551.4 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.4-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 d1f598e10a29a33d5277d43315f5e757fefe2a73e087e0346920168c962dff1d
MD5 0aec50b1afe74aa037aa20cf62d6719c
BLAKE2b-256 595f62246901a1ab4d6c634563bbd9199cc7876607feef7e3064bea3ec5d9435

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for wry_py-0.1.4-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ad89d7bc2d7d6445b0efef09307d12ea0e008acc8ff6b04574f568f9e06b0569
MD5 b16a6517f970435b668dddd82a02506f
BLAKE2b-256 d26f6bd51216c0d578f643ca9bea2a693a298250c498d325f2e4f76109010836

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for wry_py-0.1.4-cp313-cp313-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 dc301ea4dadf8d8f5dd6c03c968d3db0810a135e55689079d066fff255c48d87
MD5 f8584ae53ccc6f7de49f75073e6502c9
BLAKE2b-256 0878f6f052f4328ce102bd3f306f5d1e105e86e89357e1b502a71c03d3c3c7f4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: wry_py-0.1.4-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 551.6 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.4-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 c22208d087a27165f574b412c4d3d0664345b9d777d95845634ea7df86bad17b
MD5 af7b03178193868141036005fabc6cc2
BLAKE2b-256 4b0242de83b21eeac377b1bc579c30e9c5a0b2b3d311b95de53b24e590cd4b41

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for wry_py-0.1.4-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 05cfeed73d4704c94aae293f211607e4b110b3fa9158204e208eb3ea57e75b7c
MD5 974da49c3601350ea656b5074db23b61
BLAKE2b-256 ad150c43734d961cb525753d872754e87dd926767936f72babfe5f71625603bf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for wry_py-0.1.4-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 c53ad2e1a82d807113b1d51eea1f66eef68ca1584c866b80b40055c087e61f27
MD5 2b80e8a45fa0df0e190889d73422de58
BLAKE2b-256 d0aabfa66ccc552433070282184827d48a6cb65c9c9dda45114e95e2245fe4c4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: wry_py-0.1.4-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 551.6 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.4-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 96c0b7972a2fcb793d8f1bf6cd8d634b0e1b4f4c45b88fec4ccf0dbf4b172031
MD5 7478f08181c4940fb18b020d45ecdee4
BLAKE2b-256 e5bd55601f3c9481b5cb8b820e929a62a4d1e12a2c5653640eaeb72948e97a2c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for wry_py-0.1.4-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 de024db1af2c9e3a0cb4f566ab064d07553693ffd1eb933c23b5adadcfe04dc6
MD5 41f1effda46dde5d1759b6770b92156c
BLAKE2b-256 6f3de659e5f946809be782f3fa93e3fe1f7634779bc4f4a78c90c1d29d7ba1b5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for wry_py-0.1.4-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 0224e8c7a17726ca5e92f279feb697a7cd519758a9f34d254dee4925136c2bff
MD5 6c0b9039a0a90d196d97673ef2311618
BLAKE2b-256 67786e4d01a7bb4d15bfe44cf64b0991a637da45b9219bdc8b6b26100b26dbe9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: wry_py-0.1.4-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 551.6 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.4-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 b67814f909acae388b829106cd3b27b4a3a72b28a7006f7fec2c60f74f5a4539
MD5 c00ff44bfbfdc0543db1053c48529b38
BLAKE2b-256 4c8b9463e122f88a6123028ad293c0feb60b29a36d318b56adc4d81522264132

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