
DearPyGui - fractalb
https://github.com/hoffstadt/DearPyGui
======
jsharf
Oh, I love Dear Imgui -- it's very simple to use and has a nice...
"engineering"/scientific aesthetic. Good to hear it's been ported to python.

If you're looking for an end-user product, this may not give you the control
you're looking for. But if you're looking for a dead-simple way to create a
quick GUI for a side project, this is perfect.

~~~
mjevans
The underlying "imgui"
[https://github.com/ocornut/imgui](https://github.com/ocornut/imgui) project:

From the github page - EDIT: Read the bindings / frameworks page too,
[https://github.com/ocornut/imgui/wiki/Bindings](https://github.com/ocornut/imgui/wiki/Bindings)
It's still c++ like.

"""

Officially maintained bindings (in repository):

Renderers: DirectX9, DirectX10, DirectX11, DirectX12, OpenGL (legacy),
OpenGL3/ES/ES2 (modern), Vulkan, Metal.

Platforms: GLFW, SDL2, Win32, Glut, OSX.

Frameworks: Emscripten, Allegro5, Marmalade.

Third-party bindings (see Bindings page):

Languages: C, C# and: Beef, ChaiScript, D, Go, Haskell, Haxe/hxcpp, Java,
JavaScript, Julia, Kotlin, Lua, Odin, Pascal, PureBasic, Python, Ruby, Rust,
Swift...

Frameworks: AGS/Adventure Game Studio, Amethyst, bsf, Cinder, Cocos2d-x,
Diligent Engine, Flexium, GML/Game Maker Studio2, Godot, GTK3+OpenGL3,
Irrlicht Engine, LÖVE+LUA, Magnum, NanoRT, Nim Game Lib, Ogre, openFrameworks,
OSG/OpenSceneGraph, Orx, Photoshop, px_render, Qt/QtDirect3D, SFML, Sokol,
Unity, Unreal Engine 4, vtk, Win32 GDI, WxWidgets.

Note that C bindings (cimgui) are auto-generated, you can use its json/lua
output to generate bindings for other languages.

"""

~~~
uryga
> Note that C bindings (cimgui) are auto-generated, you can use its json/lua
> output to generate bindings for other languages.

note about this. the C++ imgui library uses stuff like out-arguments (pass a
pointer that gets filled out with a result) almost everywhere, which makes
wrapping it with a pointer-less language non-trivial – in python, you want an
interface that just returns a tuple and you'll have to code that part up
manually anyway (or come up with a really clever generator)

[source: i've contributed to pyimgui, another imgui wrapper, and we looked at
auto-generating wrappers at some point, but decided against it because of how
much work you'd have to do on top to make it "pythonic". i think they're
looking at that again now though.]

~~~
blt
SWIG can sometimes help with this.

------
mellosouls
I can't find a clear explanation of "immediate mode" GUI creation (which this
library enables) but it appears to be the sort of paradigm that pre-dated
object-oriented and event-driven interaction handling that became the norm in
the mid 90s (especially after the popularising of dev tools from Borland and
Microsoft eg. Visual Basic etc), so I guess it is a formalisation of the
procedural (?) methods from the era preceding that.

[https://wiki.c2.com/?ImmediateModeGui](https://wiki.c2.com/?ImmediateModeGui)

~~~
amelius
This library has functions such as add_button() that can be used to create a
hierarchy of widgets. From this, I suspect that the library is not fully
operating in immediate mode, but perhaps it uses some kind of mixed mode?

~~~
formerly_proven
The example only goes through the code once and then enters a GUI loop and
also uses callbacks, so ... yeah. Doesn't look like immediate mode GUI to me.

------
Sherl
Also adding this which I discovered last week,
[https://github.com/chriskiehl/Gooey](https://github.com/chriskiehl/Gooey)

~~~
microcolonel
It'd be interesting to extend this to handle pipelines, maybe by using some
sort of thing where you drag from the output field(s) of a utility to an input
field of another, causing them somehow to be fused.

------
nerdponx
I'm curious if this is comparable to some of the other Python-based GUI
frameworks out there: Tkinter, PyQT, Kivy, Toga.

~~~
ratww
Those libraries use retained-mode, which is the complete opposite of
immediate-mode that Dear ImGui uses.

So they're geared towards different things. I posted an explanation here about
the difference between retained and immediate mode:
[https://news.ycombinator.com/item?id=24318437](https://news.ycombinator.com/item?id=24318437)

------
dang
A couple small threads from recent weeks:

[https://news.ycombinator.com/item?id=24190011](https://news.ycombinator.com/item?id=24190011)

[https://news.ycombinator.com/item?id=24082524](https://news.ycombinator.com/item?id=24082524)

~~~
Jhchimaira14
I had no luck with these... lol

------
pchal
Streamlit and Gradio are in the same category I think, so what are the
differences ?

[https://www.streamlit.io/](https://www.streamlit.io/)

[https://www.gradio.app/](https://www.gradio.app/)

------
NashHallucinate
Wow, that is a lot less code than I was expecting to produce the results in
their examples.

------
snarfy
If you want to play with imgui there are some webassembly demos also:

[https://jnmaloney.github.io/WebGui/imgui.html](https://jnmaloney.github.io/WebGui/imgui.html)

------
Jhchimaira14
Pretty crazy how this library blew up in the last 48 hours. Lol

~~~
snypher
Is this due to being posted here or am I missing something? As an aside, it
would be nice if the title was or similar to:

'DearPyGui: A GPU Accelerated Python GUI Framework'

~~~
Jhchimaira14
Idk! Could be that or because it’s trending on github and Reddit’s python
subreddit.

------
stuaxo
What's the difference between this and pyimgui ?

~~~
Jhchimaira14
pyimgui tries to be a 1 to 1 wrapping of Dear ImGui, including the immediate
mode paradigm. DearPyGui wraps Dear ImGui, provides a simulated traditional
retained mode api, includes additional widgets and add-ons (plots, file
dialogs, images, text editing widget, etc.), adds asyncronous support,
addition items to the canvas, additional debug tools, etc.

Ultimately it tries to provide a complete package. Not a 1 to 1 wrapping.

------
7thaccount
Looks neat. How easy is this to setup and use? To distribute?

------
iddan
How is it different from
[https://flutter.dev/desktop](https://flutter.dev/desktop)

~~~
anaganisk
For starters, this library may not be suddenly killed off.

~~~
nurettin
[https://github.com/ocornut/imgui](https://github.com/ocornut/imgui)

""" Ongoing Dear ImGui development is financially supported by users and
private sponsors, recently:

Platinum-chocolate sponsors

Blizzard, _Google_ , Nvidia, Ubisoft """

Joke aside, google did a lot of good for imgui's development. I guess they all
love side projects.

~~~
anaganisk
Im more concerned about flutter going to the grave sooner.

------
red2awn
Difference to pyimgui?

~~~
Jhchimaira14
pyimgui tries to be a 1 to 1 wrapping of Dear ImGui, including the immediate
mode paradigm.

DearPyGui wraps Dear ImGui, provides a simulated traditional retained mode
api, includes additional widgets and add-ons (plots, file dialogs, images,
text editing widget, etc.), adds asyncronous support, addition items to the
canvas, additional debug tools, etc.

Ultimately it tries to provide a complete package. Not a 1 to 1 wrapping.

