Skip to main content

pyegui is a native extenstion for Python that provides bindings for Rust immediate mode GUI library egui.

Example

from pyegui import *

name = Str("Van")
age = Int(24)

def update_func(ctx):
  heading("My egui Application")
  text_edit_singleline(name, hint_text="Your name")
  slider_int(age, 0, 150, "age")

  if button_clicked("Increment"):
    age.value += 1

  heading(f"Hello '{name.value}', age {age.value}")
  image("file://image.png", max_width=350, max_height=250)

run_native("My pyegui Application", update_func)

example 1 example 2

Features

pyegui tries to be as close as possible to the original egui API, but with the focus on simplicity and usability. Callbacks were removed where possible to accomplish more smooth expirience in Python.

  • Light and Dark themes(defaults to the system’s)

  • Built-in latin and cyrillic alphabets. You can load any font you want with ctx.set_font function

  • Images(png and jpeg)

  • Date picker

  • RBG color picker

  • Text fields, radio buttons, buttons, code, progress bar etc.

  • No dependencies which destroy you project when you distribute it. Just pure giant Rust binary

Full list of implemented features is available here

Install

Prebuilt binaries are provided for Linux, Windows and macOS. On other platforms pip will build wheel for your OS. In this case you’ll need Rust compiler and maturin

Install from pypi:

pip install pyegui

Install from source:

git clone https://github.com/gachilord/pyegui
pip install <path to pyegui>

Usage

This is how you write a “hello world” app.

from pyegui import *

def update_func(ctx):
  # draw UI here
  heading("Hello, World!")

if __name__ == "__main__":
  run_native("Example app", update_func)

You can find more examples in the documentation.

Update functions

pyegui has a notion of update functions which the library calls to draw your UI.

def update_func():
  # you can place here any widget
  heading("I'm a heading")
  # some widgets are interactive
  if button_clicked("I'm a clickable button"):
    # you can update state from here or show another widget
    print("Clicked")

The top level update function has the Context object that controls global aspects of your app(e.g fonts and theme).

def update_func(ctx):
  ctx.set_light_theme()
  heading("Using light theme even if system's is dark")

Update functions may be nested. Such functions create a new UI scope that can have different styles and behaviour.

def update_func(ctx):
  # define update_func
  def nested():
    label("I'm a label inside nested update function")
    label("New label")
    disable() # this function will disable all further widgets in the scope
    if button_clicked("You can't click me"):
      print("Unreachable")
  # all the widgets inside 'nested' will be centered vertically
  horizontal_centered(nested)
  # this widget won't be disabled though it goes after 'disable()'
  if button_clicked("You can click me"):
    print("Clicked")

Containers

Containers is a syntactic sugar for code that needs update functions. Function calls are replaced by Python’s with statement.

The code that centers widgets vertically:

def update_func(ctx):

  def nested():
    label("I'm a label inside nested update function")
    label("New label")

  horizontal_centered(nested)

Can be written without callbacks:

def update_func(ctx):

  with Layout(LayoutType.HorizontalCentered):
    label("I'm a label inside nested update function")
    label("New label")

Variables

Many widgets require access to a state via a reference, which can’t be done for integers, floats and strings in Python. That’s why such helper classes as Str, Bool, Int and Float exist.

They are essentially the following:

# Example for bool type
class Bool:
  value = False

These classes can be used to draw UI or to store user input. You have to create them outside of update functions.

data = Bool(False)

def update_func():
  heading(f"Value of the data is {data.value}")
  # button will be shown only if the checkbox is checked
  if data.value and button_clicked("set to False"):
    # hiding the button
    data.value = False
  checkbox(data, "Check me")

Metadata

Release files for pyegui 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyegui 0.5.0
File Size Uploaded
pyegui-0.5.0.tar.gz 256.5 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for pyegui 0.5.0
File
pyegui-0.5.0-cp311-abi3-win_amd64.whl CPython 3.11 abi3 Windows x86-64 Details
pyegui-0.5.0-cp311-abi3-win32.whl CPython 3.11 abi3 Windows x86-32 Details
pyegui-0.5.0-cp311-abi3-musllinux_1_2_x86_64.whl CPython 3.11 abi3 Linux musl 1.2+ x86-64 Details
pyegui-0.5.0-cp311-abi3-musllinux_1_2_i686.whl CPython 3.11 abi3 Linux musl 1.2+ x86-32 Details
pyegui-0.5.0-cp311-abi3-musllinux_1_2_armv7l.whl CPython 3.11 abi3 Linux musl 1.2+ ARMv7l Details
pyegui-0.5.0-cp311-abi3-musllinux_1_2_aarch64.whl CPython 3.11 abi3 Linux musl 1.2+ ARM64 Details
pyegui-0.5.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.11 abi3 Linux glibc 2.17+ x86-64 Details
pyegui-0.5.0-cp311-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl CPython 3.11 abi3 Linux glibc 2.17+ IBM System/390x Details
pyegui-0.5.0-cp311-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl CPython 3.11 abi3 Linux glibc 2.17+ PowerPC 64-le Details
pyegui-0.5.0-cp311-abi3-manylinux_2_17_i686.manylinux2014_i686.whl CPython 3.11 abi3 Linux glibc 2.17+ x86-32 Details
pyegui-0.5.0-cp311-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl CPython 3.11 abi3 Linux glibc 2.17+ ARMv7l Details
pyegui-0.5.0-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.11 abi3 Linux glibc 2.17+ ARM64 Details
pyegui-0.5.0-cp311-abi3-macosx_11_0_arm64.whl CPython 3.11 abi3 macOS 11.0+ ARM64 Details
pyegui-0.5.0-cp311-abi3-macosx_10_12_x86_64.whl CPython 3.11 abi3 macOS 10.12+ x86-64 Details

Total release size: 106.0 MB

Release files / pyegui-0.5.0.tar.gz

Download URL pyegui-0.5.0.tar.gz
Size 256.5 kB
Tags Source
SHA-256 checksum
How to use checksums
d240b57ddc7b7b52fa8d5587cec5a75d6dd4ed2702323f2c619bd69e131c6775
BLAKE2b-256 checksum
How to use checksums
09ecf4f6ec6fff944245c89f05016e471bac2bf152d8bd462543faca8fa9c9ee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 23, 2026.

Transparency log

Release files / pyegui-0.5.0-cp311-abi3-win_amd64.whl

Download URL pyegui-0.5.0-cp311-abi3-win_amd64.whl
Size 6.0 MB
Tags CPython 3.11 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
bf74e8f4ea461200df0a8335afcc75234e1f77380c4a73ad938758d4b8d5121a
BLAKE2b-256 checksum
How to use checksums
02cfae8dcd79b644d6fe52a100708c14fcac7ea394d2f240d384d2e8ae6a4a83
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 23, 2026.

Transparency log

Release files / pyegui-0.5.0-cp311-abi3-win32.whl

Download URL pyegui-0.5.0-cp311-abi3-win32.whl
Size 5.6 MB
Tags CPython 3.11 Windows x86-32 abi3
SHA-256 checksum
How to use checksums
dbbbd114d43ed360df540696f0ce5e4456a88f0b6208cf9f769a3cbd7269092e
BLAKE2b-256 checksum
How to use checksums
1bcb7e20cad3249f283c5c540881dd3b9cef0ae6b9dace5be9a67ad44071ffc0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 23, 2026.

Transparency log

Release files / pyegui-0.5.0-cp311-abi3-musllinux_1_2_x86_64.whl

Download URL pyegui-0.5.0-cp311-abi3-musllinux_1_2_x86_64.whl
Size 8.2 MB
Tags CPython 3.11 Linux musl 1.2+ x86-64 abi3
SHA-256 checksum
How to use checksums
bbf77fc3a6eeb1223af578044f55258c4c3f913dc90d4dfab81ab8ac7a780073
BLAKE2b-256 checksum
How to use checksums
5988bea5090a8cae2add87cd57740c00aaf3e26e085a143834cdc2bb08053f64
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 23, 2026.

Transparency log

Release files / pyegui-0.5.0-cp311-abi3-musllinux_1_2_i686.whl

Download URL pyegui-0.5.0-cp311-abi3-musllinux_1_2_i686.whl
Size 8.2 MB
Tags CPython 3.11 Linux musl 1.2+ x86-32 abi3
SHA-256 checksum
How to use checksums
e68b8b14e1bf6abccdff2ddbb7c38925714462f970180f5079c331ddac1dfe65
BLAKE2b-256 checksum
How to use checksums
a17636264c1bf9e0efda82905668085ec59d5198f92d3ebc22bd8357cb973a08
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 23, 2026.

Transparency log

Release files / pyegui-0.5.0-cp311-abi3-musllinux_1_2_armv7l.whl

Download URL pyegui-0.5.0-cp311-abi3-musllinux_1_2_armv7l.whl
Size 8.0 MB
Tags CPython 3.11 Linux musl 1.2+ ARMv7l abi3
SHA-256 checksum
How to use checksums
97a86488a87e4c2ae45d18ec100c339ec57fcc8a90aca19fdbb6403ba052bb7f
BLAKE2b-256 checksum
How to use checksums
206da7ff59a0bcdbd95d4699d8a4c23b14e98670fdf00d7798fa9e24c0312ae5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 23, 2026.

Transparency log

Release files / pyegui-0.5.0-cp311-abi3-musllinux_1_2_aarch64.whl

Download URL pyegui-0.5.0-cp311-abi3-musllinux_1_2_aarch64.whl
Size 8.1 MB
Tags CPython 3.11 Linux musl 1.2+ ARM64 abi3
SHA-256 checksum
How to use checksums
58d03226a94067f385494503578eca190dbd133e422daf9a2017fe48d4fff97e
BLAKE2b-256 checksum
How to use checksums
a75a9b23cb031b182acca0e77b0ef8b8e02413a8fc34b198bfce47807c77d844
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 23, 2026.

Transparency log

Release files / pyegui-0.5.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL pyegui-0.5.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 8.0 MB
Tags CPython 3.11 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
9b9ac49158ac0cda5a75ea2be0cad403b588ceb8e03de91f974ec672216d96da
BLAKE2b-256 checksum
How to use checksums
793a7cebbb7e32d64d76bb4bdcbf2e939ffaa24a88f6407661041195d3c89737
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 23, 2026.

Transparency log

Release files / pyegui-0.5.0-cp311-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl

Download URL pyegui-0.5.0-cp311-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Size 7.9 MB
Tags CPython 3.11 Linux glibc 2.17+ IBM System/390x abi3
SHA-256 checksum
How to use checksums
2fb1b8b7f1146b31bb2ca487fde9ddace0618ab35c60c78b06f9ca32f802820a
BLAKE2b-256 checksum
How to use checksums
35bce7cdbe674bffb0c767a99afadf8e292df86b3580f36a23355dd0ca195820
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 23, 2026.

Transparency log

Release files / pyegui-0.5.0-cp311-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl

Download URL pyegui-0.5.0-cp311-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Size 9.4 MB
Tags CPython 3.11 Linux glibc 2.17+ PowerPC 64-le abi3
SHA-256 checksum
How to use checksums
4c4179bcd3426c397fd471f0b1910515adaf408775ec736d012a65a6ca81e2d4
BLAKE2b-256 checksum
How to use checksums
f86be5e2d09a67adad0de07500709da7775144e4fb836882a91beb6ce6c9697a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 23, 2026.

Transparency log

Release files / pyegui-0.5.0-cp311-abi3-manylinux_2_17_i686.manylinux2014_i686.whl

Download URL pyegui-0.5.0-cp311-abi3-manylinux_2_17_i686.manylinux2014_i686.whl
Size 8.3 MB
Tags CPython 3.11 Linux glibc 2.17+ x86-32 abi3
SHA-256 checksum
How to use checksums
2ec9462b17af70b57491612020d594c3a3d5614a4d4682ff67a15939d409f292
BLAKE2b-256 checksum
How to use checksums
2b4bcadf6d45cc6007a3fe0203b37ef068c807a2878774fce2bf9859b76e13e4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 23, 2026.

Transparency log

Release files / pyegui-0.5.0-cp311-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl

Download URL pyegui-0.5.0-cp311-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Size 7.7 MB
Tags CPython 3.11 Linux glibc 2.17+ ARMv7l abi3
SHA-256 checksum
How to use checksums
6f32a52de2046800b927b1e616f878954260accc21dc15419ee9d226bd3a442a
BLAKE2b-256 checksum
How to use checksums
a887c2b2a5fa390df0339445c7d8ec4d24df5d7d73ff630bd37e763a8d7dbd02
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 23, 2026.

Transparency log

Release files / pyegui-0.5.0-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL pyegui-0.5.0-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 7.9 MB
Tags CPython 3.11 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
f8868cf6e3ce6ebc15085b920fee8109f1e0e0909e2a74681c3bfdb0569ab2be
BLAKE2b-256 checksum
How to use checksums
a387aaa027df4723d810a68225d37ca3333a5d1be5ac36a71baef705de59f2a4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 23, 2026.

Transparency log

Release files / pyegui-0.5.0-cp311-abi3-macosx_11_0_arm64.whl

Download URL pyegui-0.5.0-cp311-abi3-macosx_11_0_arm64.whl
Size 6.1 MB
Tags CPython 3.11 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
ae0584123cefecd5642086db1327457b42ea29211ca14fb246a46924539272eb
BLAKE2b-256 checksum
How to use checksums
ce10cbbf896d01b3278b9786103ca9e18744547ea6292594d7eb1cda20c6a5db
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 23, 2026.

Transparency log

Release files / pyegui-0.5.0-cp311-abi3-macosx_10_12_x86_64.whl

Download URL pyegui-0.5.0-cp311-abi3-macosx_10_12_x86_64.whl
Size 6.3 MB
Tags CPython 3.11 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
b877457350112cd2264f4ad14771c5564a4a1badbe71e38ebdb359df30775dcf
BLAKE2b-256 checksum
How to use checksums
8fcec33ca9b178a75b3108ec7783d2eb9452c6dd2688beb36daa31a04f8efaa3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 23, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.5.0 This release

15 release files

0.3.2

3 release files

0.3.1

7 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page