DearPyGui README

The project's README from github.com/hoffstadt/DearPyGui. As one markdown file: README.md.


Dear PyGui logo

A modern, fast and powerful GUI framework for Python

Python versions PYPI Downloads MIT License

static-analysis static-analysis Deployment Documentation Status

Features • Installation • How To Use • Demo • Resources • Support • Tech stack • Credits • License • Gallery


Themes

Features

        

        

Installation

Ensure you have at least Python 3.8 64bit.

pip install dearpygui
or
pip3 install dearpygui

How to use?

Using Dear PyGui is as simple as the following Python script.

import dearpygui.dearpygui as dpg

def save_callback():
    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.start_dearpygui()
dpg.destroy_context()

Dear PyGui example window

Demo

The built-in demo shows all of Dear PyGui's functionality. To run the demo, you can run:

python -m dearpygui.demo

Or you can use this code to run the demo. The following impression shows a few, but not nearly all, of the available widgets and features. Since the Python code of the demo can be inspected, you can leverage the demo code to build your own apps.

Dear PyGui demo

Resources

Support

If you are having issues or want to help, here are some places you can go.

Chat on Discord       Reddit

Tech stack

Dear PyGui is built on top of Dear ImGui, including the ImPlot and imnodes extensions, and is fundamentally different than other Python GUI frameworks. Under the hood, it uses the immediate mode paradigm and your computer's GPU to facilitate extremely dynamic interfaces. In the same manner Dear ImGui provides a simple way to create tools for game developers, Dear PyGui provides a simple way for python developers to create quick and powerful GUIs for scripts. Dear PyGui is written in C/C++ resulting in highly performant Python applications. Dear PyGui is currently supported on the following platforms.

Platform Graphics API Newest Version
Windows 10 DirectX 11 PYPI
macOS Metal PYPI
Linux OpenGL 3 PYPI
Raspberry Pi 4 OpenGL ES PYPI

Credits

License

Dear PyGui is licensed under the MIT License.

Sponsor

Continued maintenance and development are a full-time endeavor which we would like to sustain and grow. Ongoing development is financially supported by users and private sponsors. If you enjoy Dear PyGui please consider becoming a sponsor or buy us a cup of coffee.

     

Plotting/Graphing

Dear PyGui includes a plotting API built with ImPlot

        

        

        

        

Node Editor

Dear PyGui includes a node editor built with imnodes

Canvas

Dear PyGui includes a drawing API to create custom drawings, plot, and even 2D games.


BasicUsageExample

SAST Tools

PVS-Studio - static analyzer for C, C++, C#, and Java code.

DearPyGui (hoffstadt/DearPyGui)

Searching Database…

15.6K ·GitHub
这是什么东西?Dear PyGui 是一个快速强大的 Python 图形界面(GUI)工具包:你编写 Python 代码,就能得到带各种控件、图表和节点编辑器的原生桌面窗口。它还内置了一个演示程序,展示全部功能。
它是我在 Python 脚本里导入的库,还是一个独立的软件?它是一个 Python 库——安装到你的 Python 环境后,在你自己的脚本中导入它来搭建界面。唯一的独立程序是内置的演示程序,它的作用就是展示这个工具包。
我怎么把它跑起来?先确保你装了 64 位的 Python 3.8 或更新版本,然后安装 dearpygui 这个包(pip install dearpygui),在你的脚本里导入它,再运行内置的演示程序,就能看到所有功能的实际效果。
除了 Python 之外,我还需要别的东西吗?只需要 64 位的 Python 3.8+ 就行——依赖非常少。它的性能来自 C/C++ 内核和基于 GPU 的渲染,而不是靠额外的包。
它能运行在哪些平台上?官方支持 Windows 10(DirectX 11)、macOS(Metal)、Linux(OpenGL 3)和树莓派 4(OpenGL ES)。
它开箱就能做什么?完整的主题和样式控制;用 GPU 渲染的图表,能以 60 帧每秒流畅显示超过一百万个数据点,并支持缩放和平移;还有节点编辑器、用于自定义绘图的 canvas 绘图 API,可以画图表甚至做 2D 游戏;支持异步函数;另外还带开发者工具:主题和资源检查器、运行时指标以及调试器。
有没有简单的方法学习它?有——内置的演示程序展示了 Dear PyGui 的全部功能,而且演示程序的 Python 源码可以查看,你可以直接借用里面的代码用到自己的程序里。README 里还链接了文档、教程、常见问题、最佳实践代码片段,以及带源码的示例应用。
作者为什么要做这个项目?Dear ImGui 让游戏开发者能简单地创建工具,作者想给 Python 带来同样的体验:为脚本快速构建强大的图形界面。它由 Jonathan Hoffstadt 和 Preston Cothren 全职开发,靠用户和赞助者的资助维持。
What are similar projects?imgui, Nuklear, nanoui, kivy, slint, nuklear, shadPS4, mygo
Creator
hoffstadt
Size
143.2 MB
Stars
15.6K
Age
6y
Commits · 90 Days