Skip to content

CasuallyCalm/dearpygui-async

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 use with other async applications

Installation

pip install dearpygui-async

Note: you will need to install dearpygui separately in order to use this!

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_dearpygui()`
dpg.destroy_context()

License

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages