No project description provided
Project description
Python bindings for Iced.
Iced is a cross-platform GUI library focused on simplicity and type-safety. Inspired by Elm.
Installation
$ pip install pyiced
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,
]),
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()
TODOs
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.0a2.tar.gz
(110.2 kB
view hashes)
Built Distributions
Close
Hashes for pyiced-0.3.0a2-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 30992a023dcd5caf9733e0f7f751d686770a026eb355f0d56f8ca6311b01614a |
|
MD5 | e9ae19d2636682eef7665052a6453994 |
|
BLAKE2b-256 | d31cd87bbb1584f02525933368bf99835c3da1b26dc1e893e36dd02ee7cf3318 |
Close
Hashes for pyiced-0.3.0a2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f86d1963166aff332b95a8063fd9dc41007f57b4cbfa1a9bb8a010b6810d0efd |
|
MD5 | 7f2ab5c724344e4369d7aff7f77db6dc |
|
BLAKE2b-256 | b9e73db7211211a37fbaa901e1d3627c87fb641c6d35595f0ba01c875add971b |
Close
Hashes for pyiced-0.3.0a2-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e1df8c128e7f08e5d7acd17c552650fc429d514bdcc3e244e82bb17e389a9fb5 |
|
MD5 | 83f3aa636dbf8dbc77a1af1dd2cfd163 |
|
BLAKE2b-256 | 57632f63c10473d1382f887c1fd48c3fee9dbaf0569758a7872abd191f84cd88 |
Close
Hashes for pyiced-0.3.0a2-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d57f907f789d0c81c780143aa12e2dd2fbdc1d31a48b32e786c74ce80fe2977c |
|
MD5 | 20f1eee203abc2ccebc546686d784727 |
|
BLAKE2b-256 | df3f29d64ad79c7d0c6126b29785b91502cd2dc8e9e74fce8d3c54cd24d98465 |
Close
Hashes for pyiced-0.3.0a2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5fbd50dd28ebc5b318d6031335ceb3174c4867e5f305c78f22893179ae421fbe |
|
MD5 | 565266ca6f9981a1bea24daade88d5db |
|
BLAKE2b-256 | e36139a16f5e2196e6b336bb0bcb0a63b35935c36553ef1b7143dea0fdb1231d |
Close
Hashes for pyiced-0.3.0a2-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5285801d0048dee8c38198a1f489532ecdea8ffebd31f8f9f3f8b05dff6996de |
|
MD5 | cd8f653851bd30585aef284b72152a00 |
|
BLAKE2b-256 | 9d18e98870bac4760696572dd6020958f3f60526ac591621d5c93e63e83ea81f |
Close
Hashes for pyiced-0.3.0a2-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e42c770fd86bf0897938b942ae315809134e56e5537855619e0cc236c3b522b1 |
|
MD5 | 272e2b2c8a75df21d2ca40ec5020bc7d |
|
BLAKE2b-256 | 8350ea3b68443bb20a1602f61da3ce224f0a61e85dbae3befba1ae2782b1d73d |
Close
Hashes for pyiced-0.3.0a2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 905b1bfedb940d7cbe9a09648996effe72554a334b08c113583ba6287e4beda6 |
|
MD5 | e1a5e5aec4791aa4c582361620e82570 |
|
BLAKE2b-256 | e05f3c512b370d3f56d615aec3c30c0080b0b4d5b0768fd5de23c4e4d24995d0 |
Close
Hashes for pyiced-0.3.0a2-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 316d4bca47f2575593a2760665e7a0355f2969cf33a233819deba333ce98ea84 |
|
MD5 | 237f2594d9cfdd178708ebca2a1ac7ff |
|
BLAKE2b-256 | 895a9ce8d0c9ddbf76d9b59e322bde88d95a4ee625bfb6f414fadbda40a8bc6d |
Close
Hashes for pyiced-0.3.0a2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4275b38c128c91a1cac1169a3462254712afeb66d4f51ee426fab0882191d05c |
|
MD5 | 04e8e9cc6a00b50267213afb57e79b92 |
|
BLAKE2b-256 | ba0fb0c481b2a835f906c279329617d73038c456ad613524319134442f8319f9 |
Close
Hashes for pyiced-0.3.0a2-cp37-cp37m-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 47e22e95628fc15d3d744172c3761ab85454d33629286ac996b971facf253487 |
|
MD5 | a127eab6146d5f46c49f054f6ba7c2a0 |
|
BLAKE2b-256 | 3ddb8c3fb8bf0add418e5a486bc8c84f92a6d98b14d3e1093a80e033bb469f71 |