Skip to main content

An async helper for dearpygui

Project description

dearpygui_async

PyPI - Version PyPI - Python Version

A simple way to integrate some async functionality into your dearpygui application.

Key Features

  • Ease of use
  • Async callbacks
  • Setup & Teardown functions for us with other async applications

Installation

pip install dearpygui-async

Simple Example

import asyncio
import dearpygui.dearpygui as dpg
from dearpygui_async import DearPyGuiAsync # import

dpg_async = DearPyGuiAsync() # initialize

async def save_callback():
    await asyncio.sleep(3)
    print("Save Clicked")

dpg.create_context()
dpg.create_viewport()
dpg.setup_dearpygui()

with dpg.window(label="Example Window"):
    dpg.add_text("Hello world")
    dpg.add_button(label="Save", callback=save_callback)
    dpg.add_input_text(label="string")
    dpg.add_slider_float(label="float")

dpg.show_viewport()
dpg_async.run() # run; replaces `dpg.start_gui()`
dpg.destroy_context()

License

dearpygui-async is distributed under the terms of the MIT license.

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

dearpygui_async-0.1.0.tar.gz (4.7 kB view hashes)

Uploaded Source

Built Distribution

dearpygui_async-0.1.0-py3-none-any.whl (4.1 kB view hashes)

Uploaded Python 3

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