Skip to main content

Declarative Tkinter UI using makup language with reactive data binding

Project description

License Build Quality Gate Minarca Client Coverage

TKVue

Declarative Tkinter UI using makup language with reactive data binding.

Description

TKVue bring familiar advantages in web development to traditional development. This project allow you to create modern graphical user interface written in Python using Tkinter library.

TKVue provide a declarative language to build user interface with Markup language.

<Label text="Hello world!" />

TKVue provide databinding to quickly make your graphical user interface dynamic.

<ComboBox pack-side="left" pack-expand="1" values="['zero', 'one', 'two', 'three']" textvariable="{{ myvariable }}" />
<Label text="{{ myvariable }}" />

TKVue provide a babel entry point to support internationalization.

babel.cfg:

[tkvue: **/templates/**.tkml]

Installation

TKVue is available on pypi and can be installed using pip.

pip install tkvue

Usage

Once installed you may take a look at various examples available:

https://gitlab.com/ikus-soft/tkvue/-/tree/master/doc/examples

Help is welcome to write proper documentation about how to use TKVue.

Support

If you need help or experience problem while using TKvue, open a ticket in Gitlab.

Result

Once you have customize the Tkinter themes, the result could be astonishing. Here the result of Minarca interface build using TKVue.

Minarca Agent graphical user interface build with TKVue

Translation

Tkvue provide a babel extention to extract static text from xml template.

You must configure babel to use the right plugin to extract the values from the templates.

babel.cfg:

[tkvue: **/templates/**.tkml]

Then You may use babel and other gettext tools to complete the translation using the .po file.

python setup.py extract_messages

See Also

Other Tkinter-related projects worth mentioning:

  • witkets: Create Tkinter interface using XML similar to TKVue
  • ttkbootstrap: Theme extension for tkinter inspire by Bootstrap

Changelog

2.1.6 ()

  • Add support @tkvue.computed() annotation to register attribute dynamically
  • Add support Python 3.12
  • Ajust asyncio event loop to keep it running when mainloop() exit
  • Add support Grid Geometry manager
  • Add support @tkvue.attr() annotation to register attribute dynamically for custom component
  • Add support style attribute on TopLevel to inherit background color
  • Add loop_idx variable when using for attribute

2.1.5 (2023-10-18)

  • Fix infinit recursion depth when root is not yet defined

2.1.4 (2023-07-26)

  • Update background of ScrolledFrame when style is configure
  • Register "wrap" attribute only for Label

2.1.3 (2023-07-25)

  • Define minimum height for ScrolledFrame.

2.1.2 (2023-07-13)

  • Fix display of scrollbar in ScrolledFrame when resize on Y axis.

2.1.1 (2023-07-12)

  • Fix display of scrollbar on initialization.

2.1.0 (2023-04-20)

  • Add many examples for self documentation
  • Provide the @tkvue.widget annotation to register a new widget.
  • Provide the @tkvue.attr annotation to register the custom attributes of the widget.

2.0.3 (2023-02-26)

2.0.2 (2023-02-08)

  • Add example to demonstrate usage of variables dynamic.py
  • Add example to demonstrate usage of visible= attribute to show or hide widget dynamic_visible.py
  • Add example to demonstrate usage of for= attribute to create list of widget dynamic_loop.py
  • Add example to demonstrate style customization color.py

2.0.1 (2023-01-16)

  • Support assignment of None to <Label image="..." > to hide image animated_gif.py
  • Add example to demonstrate usage of <Progressbar> progressbar.py

2.0.0 (2022-12-13)

  • Implement mainloop using asyncio to avoid multi-threading #1
  • Increase default offset when displaying <Tooltip> to avoid flikering when user hover a widget
  • <ScrolledFrame> inherit the background color from the style
  • Show or hide scroll bar of <ScrolledFrame> when needed
  • Pin version of black, isort and flake8
  • Add support for place geometry manager

1.0.1 (2022-11-09)

  • Fix license badge
  • Declare babel entry point for translation
  • Add combobox example
  • Use private gitlab runner for running test

1.0.0 (2022-04-06)

  • Initial version of TKVue writting for Minarca project

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

tkvue-2.1.6-py3-none-any.whl (199.2 kB view details)

Uploaded Python 3

File details

Details for the file tkvue-2.1.6-py3-none-any.whl.

File metadata

  • Download URL: tkvue-2.1.6-py3-none-any.whl
  • Upload date:
  • Size: 199.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.1

File hashes

Hashes for tkvue-2.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 277fadb6e4940c46f44414a4e875e6cff19e5e29d5c446b8b2788b040f85b5d9
MD5 1e6733f1a3155961d93a63133a740624
BLAKE2b-256 af58ed74d1e02d7e2e12d538e4abb2124c0e96d544d91718b154c5548570ff10

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page