Bindings for Iced, a cross-platform GUI library focused on simplicity. Inspired by Elm.
Project description
Python bindings for Iced.
Iced is a cross-platform GUI library focused on simplicity and type-safety. Inspired by Elm.
Installation
Precompiled wheel:
$ pip install pyiced
From source:
$ pip install .
To install from source you need to have a recent version of Rust installed in your $PATH.
Rustup is probably the most easy to use option to install and update Rust on your system.
Quick Example
from pyiced import (
Align, button, ButtonState, column, container, IcedApp, Length, text,
)
class ExampleApp(IcedApp):
def __init__(self):
self.__incr_button_state = ButtonState()
self.__decr_button_state = ButtonState()
self.__value = 0
def title(self):
return 'Counter'
def view(self):
increment_button = button(
self.__incr_button_state, # To track the state across redraws.
text('Increment'), # This is content on the button.
on_press='incr', # This value is received in update().
)
value_label = text(f'{self.__value}', size=50)
decrement_button = button(
self.__decr_button_state,
text('Decrement'),
on_press='decr',
)
return container(
column(
[increment_button, value_label, decrement_button],
align_items=Align.CENTER,
),
padding=20, align_x=Align.CENTER, align_y=Align.CENTER,
width=Length.FILL, height=Length.FILL,
)
def update(self, msg, clipboard):
# When an event occurs, this method is called.
# It can optionally return a list of async functions,
# to handle the event.
match msg:
case 'incr':
self.__value += 1
case 'decr':
self.__value -= 1
if __name__ == '__main__':
# This function only returns if there is an error on start-up.
# Otherwise the program gets terminated when the window is closed.
ExampleApp().run()
Bigger Example
Please find the source code in examples/chess.py.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pyiced-0.3.0a6.tar.gz
(75.2 kB
view hashes)
Built Distributions
Close
Hashes for pyiced-0.3.0a6-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fe868b50b259b43e305a11ab55a1fb4a9c7a6f3fcbd07ad291daabe7377972ff |
|
MD5 | adafedf0adaa3ad486c6fd5a23c200fc |
|
BLAKE2b-256 | fc09ee39fdd02fcd7116ef92efda85508dae981c26d24a3ca64153c659db75a1 |
Close
Hashes for pyiced-0.3.0a6-cp310-cp310-manylinux_2_24_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f69db23f2aebe107222a85b692a1c5832442c1de27570d83c2a6081543038959 |
|
MD5 | 38cb25dd17f0b312a92edd1c46af101d |
|
BLAKE2b-256 | 946838a68818c0ab9d6449dbf7d6970dea309850339c91f8319c0fee5dd04d6a |
Close
Hashes for pyiced-0.3.0a6-cp310-cp310-manylinux_2_24_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b59ae74f069107328e44a8a596a8a41feb6f898b3e86c7a69d7b40105a84e73b |
|
MD5 | 0f68eb74389b5649f5713259c6d3340d |
|
BLAKE2b-256 | b90e6239746ee22b745d5ed870df76f09ff5a47535dab8c283648d4e123123c3 |
Close
Hashes for pyiced-0.3.0a6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b1fdc84a35a6f499bacd2e2aabd669eb6a14242494055d97a02f625d0bbcf496 |
|
MD5 | 034572dc93db4809ee0f61cd75195f00 |
|
BLAKE2b-256 | 1210bfc86f69d692c606b3231c53b96a09c8fd2a718ab9689900d16b860fb49c |
Close
Hashes for pyiced-0.3.0a6-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 974b98956524fd373c17b8260479460c25e34f81f7b6e6e75bf5df2aab70f66c |
|
MD5 | 333a694ec72e280d41f5840723e8393c |
|
BLAKE2b-256 | a03715a44b6a4d02b0dc066637d1679a7de0fc22fc30bb5110608935b01e21c8 |
Close
Hashes for pyiced-0.3.0a6-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a942ee27510cc9a33472fa2d14eeb320808814400f3e40a6cac6732637890114 |
|
MD5 | ea9bff0992b1d91f95ace83d06ab3528 |
|
BLAKE2b-256 | 514a2ea5cac91bdfbf32135e822e885b731f7606be67cf3db7df53767af7eecd |
Close
Hashes for pyiced-0.3.0a6-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5253267cfe0cdb9a0355d067758a5bdc33cf3623b922c1d91a4243bd9e3d9d3c |
|
MD5 | c6f9f3d30a0f9629f28182bf7ce5ed66 |
|
BLAKE2b-256 | 453ad58a4caeb9173361828cc2e17b11dcffde33633c72e76cfff4922d8751a4 |
Close
Hashes for pyiced-0.3.0a6-cp39-cp39-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | af5fed336e8c10da68b227dd4c84774c6dee6f8296ce3640d826bcac72b96921 |
|
MD5 | b4a98cef746d6aab19f30040adf47ab2 |
|
BLAKE2b-256 | a152d04c374d03c5f09541274480da7762f0a68b801d5dbbf4d88351d8038aaa |
Close
Hashes for pyiced-0.3.0a6-cp39-cp39-manylinux_2_24_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d035c365b7530339984a3d3a27097ee972442b56fee8e795cee372d6c3548edc |
|
MD5 | 40d483eb63bcf92b1094bfd1486a2440 |
|
BLAKE2b-256 | 9b1396eba5d49eeb53976e9c42d0fd1b05697a7e7bdddd6fb923cd26628aaee3 |
Close
Hashes for pyiced-0.3.0a6-cp39-cp39-manylinux_2_24_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fe8cc8898c219e70d3cd1a5fec158d84ff0bb7130d13929b27e3d42eed7f574f |
|
MD5 | 23262499048aca129429a623d3d97e2b |
|
BLAKE2b-256 | 425d86b3310597c395b4482b76f279b512a2eeb1b33394eab87971f074098b86 |
Close
Hashes for pyiced-0.3.0a6-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fa0fccabb78318d51444f9e1d3789b0eb0e332556bbb377856fe3aad5ac06d11 |
|
MD5 | 22f411030d80e1ed8b5dc7dd89cae802 |
|
BLAKE2b-256 | 02ccfc33f225d0b0e55df7b7a9cb56cf46ddb9e6d1b4cefc30d45efb62f95b6d |
Close
Hashes for pyiced-0.3.0a6-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 97bc89e07a9c7966aa4a0073ce1b3ddde37f10f6a22c91209e9ea2ee8b94680f |
|
MD5 | c98011d0a39f8e8112fe248cf35acc10 |
|
BLAKE2b-256 | e493848733b4f02c324d5322a455fe3ad26da7a828e9054c275d0ad46c438d8b |
Close
Hashes for pyiced-0.3.0a6-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 469f187695bb389ab341b51b649e58b4fe3e57e9a0b0e3408e1f1dc7d6fcd99f |
|
MD5 | c928259c9d689413ebac4702fa3ebdf5 |
|
BLAKE2b-256 | fea087738291f1765c278e67113827906be2eb2f83b97def6abddf0062aea61a |
Close
Hashes for pyiced-0.3.0a6-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fb0dc107823646c3d584781ae8da0453fbadec86f1e7dfa60e435d36652e696f |
|
MD5 | 66140a4d786f0c5ec0b6705f6c2ee9c8 |
|
BLAKE2b-256 | 6e229d44477fe7c5175543540197e1844b8918dcad944276239733cd708c38e0 |
Close
Hashes for pyiced-0.3.0a6-cp38-cp38-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fef6555538e7cdaedf78cd59f20597e8908e4a75e7db1be7fe7daf05ed877398 |
|
MD5 | e9408a004aad12f846e976d3584f2951 |
|
BLAKE2b-256 | 339ee2bdcc376ff1b4f51286e2d7e23180d8073aaadb7e3d5e4f8a17b281d209 |
Close
Hashes for pyiced-0.3.0a6-cp38-cp38-manylinux_2_24_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5e08d0d34cb7ce6ef1b06e382db3e6e91116dfeb9328425e541c17a1bc5f6bd7 |
|
MD5 | afbd2292cac291a4bdf78ca0acf7771a |
|
BLAKE2b-256 | 943880aaf38d721dc8ffd630b2d733280be5d711d328c24107d3b899a5efaba5 |
Close
Hashes for pyiced-0.3.0a6-cp38-cp38-manylinux_2_24_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7fa151e8259dce95b6eb76f548e588fc0d312bc1bd749fd1cbc2952c9a68c979 |
|
MD5 | 4594bdd9149d63d9ce90d72b5417ceda |
|
BLAKE2b-256 | 6731f3de0f0e98c4123f7b18093f9c3af381ec040af4a2dd479dde347a88f870 |
Close
Hashes for pyiced-0.3.0a6-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 52bfde0c2f97ec59b7e490644a3fb90967153d79b0fe5101d7fa01013bbc0de5 |
|
MD5 | 70b887e10dea99400d965305e437e16a |
|
BLAKE2b-256 | 8d7ef495876fe2d44e59618c006e59f57744cc2d609b50759e759cbaf20bf257 |
Close
Hashes for pyiced-0.3.0a6-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5e9fc6d90b55456a6d023f6d08da28b8de22ee52281c0c17a58e463f03f9080f |
|
MD5 | 26f5bb9abcf1817d9711bb32001926f6 |
|
BLAKE2b-256 | 6de5c38cf4b230b75afb24de86e67f0eb6d3a75b48ecf0d8e2bfed119d4384f4 |
Close
Hashes for pyiced-0.3.0a6-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 752ace8e3c161c16c3ccfec768b9c0bf439b8e8c9841019dca70e344f10a33e5 |
|
MD5 | fdff60eda7f561d8a89fc6643b0e879b |
|
BLAKE2b-256 | d8e46884752f185129357b7cdcbc69660e3d3a8c07f4885b0c5980350cb1e125 |
Close
Hashes for pyiced-0.3.0a6-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 90a960ced9320b2a105579f14ffd27a69d73b0b411e123c71b700982c0d4cb42 |
|
MD5 | 07d7294aed2dec06540a42ae247ad180 |
|
BLAKE2b-256 | d10221eed99d3c80249092d7a81711a6bb27316cbcabba4fad7acac2626cba1f |
Close
Hashes for pyiced-0.3.0a6-cp37-cp37m-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1a4669429720367fff08268a1b7225ba90a0e19ebb8f4c9b9b19a5cd4c90d146 |
|
MD5 | e7162e2a1815653abc00c50259bd4ac6 |
|
BLAKE2b-256 | b92550571e292760712702a57eed110806618aefcf1202680303445c99aa2c2e |
Close
Hashes for pyiced-0.3.0a6-cp37-cp37m-manylinux_2_24_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 78fd160bfb40d1245ea811c284afb7f85ad3c336fc5e9fc14732a324de4782ec |
|
MD5 | 2b9ca082b6df5959b6fe78579de5604b |
|
BLAKE2b-256 | b57fa063f9e3d347b604615b844a1a1c924ae591e2cf72942de54257691b5f4d |
Close
Hashes for pyiced-0.3.0a6-cp37-cp37m-manylinux_2_24_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3fcd99960c12277fc4e966738cffcc16eab066c5eefaf8652420f73a532adb9e |
|
MD5 | 6d0ca7d58d34cd5bee2f10010be51d0b |
|
BLAKE2b-256 | b5c52f514adb56d9a37677f0cd1a6623b11689fffa26d7780f8242db50935b11 |
Close
Hashes for pyiced-0.3.0a6-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1e0ecf3a4798490e4f7ac0d984578cec7328c3d0add618f1dba501b37fb06733 |
|
MD5 | f018760f6a325afc2778e5d8165c342f |
|
BLAKE2b-256 | ba8fb1eaef01e424d3e7e05bb7eb2c9b82a12d43f3baa206e66af4fa613c66d4 |
Close
Hashes for pyiced-0.3.0a6-cp37-cp37m-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b1033ec66de6403df345f20e31c386287f291cdd8ec8d90c8948e39e6de23eb1 |
|
MD5 | 7189d074055f33284243398395adbbd9 |
|
BLAKE2b-256 | de2cf9bac6961ba6e7c9f3c2d3749eefd3d5da6bb8112490b4b0ea1e49b03b1b |
Close
Hashes for pyiced-0.3.0a6-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 914fde6367addd739667821fb497d553fc2f2559820a43240daa02c0c59a297e |
|
MD5 | b3c34322a08e265ceb57a86675ebfac5 |
|
BLAKE2b-256 | 74562ff0ed3260cbc3015f7da676a4d4c7093237ee1f2074348e4bb26bb8b276 |
Close
Hashes for pyiced-0.3.0a6-cp37-cp37m-manylinux_2_12_i686.manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fee77055e366c36c951e09b23b912211f89a4d6884e2d52c19d6f09a7d8768a0 |
|
MD5 | 43cbf06a435a2c429ba6083f9684f5d5 |
|
BLAKE2b-256 | 79a9629d529c31c0c91fef495388cc930d33b842a3a73b708f7b607011c31a9d |