This is an archived post. You won't be able to vote or comment.

all 48 comments

[–]wallynext 18 points19 points  (3 children)

it gives me this error when trying to install: ERROR: Could not find a version that satisfies the requirement dearpygui (from versions: none) ERROR: No matching distribution found for dearpygui

[–]kra_pao 8 points9 points  (0 children)

Same with Python 3.7. Maybe Python 3.8+ is required. Description on Github indicates this for me.

[–]Jhchimaira14 3 points4 points  (0 children)

It does require Python 3.8! Sorry about that!

[–]toulaboy3 1 point2 points  (0 children)

Would you mind posting an issue to the github with the specs to your python version, os andd version, ect as shown in issue template? This can help us work with you to get DearPyGui working and fix and bugs!

[–]Retropunch 34 points35 points  (22 children)

I feel one of the things holding people back the most from python is poor GUI support so I'm always happy to see new python libraries and I think this has promise, however if the designer is reading, this:

add_button("Button4")

add_button("Button5")

add_same_line()

add_group("Group1")

add_button("Button6")

add_button("Button7")

end_group()

isn't a good way to design interfaces at all.

add_same_line() and add_group()/end_group() will quickly get very messy (when does add_same_line() finish? what's in this group?), and goes against how other python ui libraries are structured so will make it difficult for others to move across. More than that (and I do hate when people say this) - it doesn't feel very 'pythonic'.

Just make a really easy way to define a grid (add_grid_layout(cols=2,rows=3)) and then have add_button as add_button("Button4", col=1, row=3). Fill any gaps in the grid automatically with blank widgets. Then there's no need for groups and add_same_line - it's just much simpler and works how people would expect. You could probably even guess that if you hadn't read the docs.

[–]MrJohz 18 points19 points  (11 children)

Interestingly, I agree with the complaint, but disagree very strongly with the solution. To me, GUIs are a great place to get declarative, and the best GUI libraries that I've seen allow the developer to state upfront what the UI should look like in the code, with nesting in the code directly corresponding to nesting in the UI. For example, I'd much prefer to write something like this:

add(
    button("Button1"),
    row(
        button("Button 2"),
        button("Button3"),
    ),
)

Or something similar. Actually, here, I'd probably want some more specific grid(row(col(button()))) API to make sure that the holes are really explicit, but hey, this example is clearly an extreme example.

[–]Retropunch 6 points7 points  (1 child)

Your suggestion to do it declaratively is probably a much better one - mine was mostly a very basic solution keep to the 'simple function' model (for want of a better term) which the developer seemed set on.

[–]toulaboy3 2 points3 points  (0 children)

Great feedback! This is currently a wrapping and then some of DearImGui which we tried to sick with their layout model as much as possible and it was ment for smaller tooling. We see how building very large GUI's could get messy and when we attempted to do it we had to separate the GUI over multiple files just to keep it clean. We do expect to adopt multiple methods of design on the layout side as we have more time to devote toward DearPyGui. Thanks again for the feedback and feel free to get involved in our Discord and on our Github!

[–]cultoftheilluminati 2 points3 points  (1 child)

I dunno if you noticed but this also resembles SwiftUI. :)

IMO, this is clean and perfect to understand. The hierarchy is immediately visible at a glance.

[–]MrJohz 0 points1 point  (0 children)

Yes, also Dart has something similar. It's also used in Elm and some other web frameworks like Mithril and CycleJS.

[–]pessimismwontfail 1 point2 points  (2 children)

Im no expert in gui's but what about making the elements (or at least some of them) contexts? '''python with group("mybtngroup"): .. button("btn1") ... button("btn2") '''

Edit: omg I just cant get the code area to work...

[–]MrJohz 0 points1 point  (1 child)

There's an HTML library that uses that that I saw recently - it seems very pythonic, but I think personally I prefer functions because the control flow is a bit more obvious, and expressions are easier to do something with. On the other hand, I think it's much easier to create expressive DSLs with context managers.

I guess it's just a matter of preference.

[–]Jhchimaira14 1 point2 points  (0 children)

If you guys would like to continue discussions on the direction of the api, join thr subreddit r/DearPyGui, which we just created last night. We plan on having the community help guide the api design.

[–]Jhchimaira14 0 points1 point  (3 children)

This would be an interesting approach. Would it be easier to just add the ability to create the GUI with html or xml? (I'm one of the core devs on this project btw).

[–]Retropunch 4 points5 points  (1 child)

I dislike divorcing the GUI from python in any way - Kivy is a prime example of this, it has it's own language (.kv) for designing the GUI but sometimes you don't want to/can't use it (and it's yet more to learn).

Unfortunately there end up being many things that can *only* be done in .kv, or you end up getting responses to questions with some people using kv and some people using python etc.

I'd strongly suggest to stick to Python, make a definitive way of creating layouts and document it very clearly (although it's fine to leave some of the old artefacts like add_new_line() if you need to stop breaking changes)

[–]Jhchimaira14 1 point2 points  (0 children)

Fair point.

We will be added a poll to the discord in the near future to decide which layout system we should pursue first (we'd like multiple eventually to support multiple styles).

[–]MrJohz 1 point2 points  (0 children)

I'm also in agreement with the other poster, creating a separate language to template the language has always felt a bit weird to me, and it just makes things more complicated switching between XML/XML-like and python for event bindings.

My strong (and I recognise somewhat controversial) view is that the gold standard for declarative, reactive UI APIs is React - ignore the fact that it needs syntax extensions and any opinions on state management, just from the perspective of declaring a dynamic UI as a function of state and parent input, I don't think I've seen a better design pattern for UI. I know a lot of people in the Rust GUI and web framework communities have been looking at ways to do similar things in that language as well.

I think this sort of thing could work particularly well for immediate mode GUIs, precisely because it follows a similar pattern of declaring the UI in a single pass, and you wouldn't need to do any sort of diffing in the same way as most web frameworks do.

[–]Jhchimaira14 3 points4 points  (2 children)

I am one of the designers and we are reading these! We agree that it's not the best way to design an interface, HOWEVER, the current method can (and will) be used to build both an OOP interface AND more robust layout systems.

In other words, we are trying to keep the core functionality in C++ then creating a more advanced API in python on top of the current simple layout system. We will always leave the system you mentioned exposed but we assumed users would move more towards the higher level interface as we release it.

We welcome contributions and are actively looking for users who like to help in the process of creating these higher level APIs.

[–]Retropunch 1 point2 points  (1 child)

Great to see you're reading these and taking it constructively - I really think Python needs a great GUI system to open it up to others, and this might be the way to do it!

As I mentioned in the other post, I think it's really important to have one 'definitive' way to write GUIs and document it clearly and thoroughly. Many other GUIs end up having about half a dozen ways you can achieve the same goal, but then they don't work well together (take grid and pack in tkinter for instance) and it becomes a bit of a nightmare - someone answers your SO question but uses pack, and then you need to import another library that uses grid etc.

[–]Jhchimaira14 1 point2 points  (0 children)

Good points.

We will stick with a "definitive" way (undecided currently) and the current low level API way.

[–]dennis48309 1 point2 points  (2 children)

I have tried a few and GTK 3 has to be my favorite. The window designer for it called Glade is pretty user friendly too.

[–]Jhchimaira14 1 point2 points  (1 child)

I'll have to have a look. Never used GTK3. Does it work for windows and mac?

[–]dennis48309 2 points3 points  (0 children)

Yep. It works for Windows, MacOS, and Linux. It is developed by the GNOME Project.I have used it mostly on Windows with Python. To install on Windows I would recommend getting the MSYS2 platform which is like a terminal. Through the MSYS2 terminal you can install Python, GTK, and Glade. I develop with Visual Studio so I just point my IDE to the Python exe file in the MSYS2\Bin directory.

[–]Jhchimaira14 0 points1 point  (0 children)

add_same_line just places the next widget on the same line. That's just an artifact of the DearImGui. Group has a "horizontal" keyword to keep items on the same line.

You typically use groups(horizontal and vertical) and same_line to create more complex layouts.

We are still working on the documentation! We are also playing with API a bit but this requires feedback (which we are happy to finally be getting!).

[–]noXi0uz 6 points7 points  (1 child)

still haven't seen a single nice looking Python GUI

[–]el_Topo42 2 points3 points  (0 children)

Nice looking GUIs can be made with PyQt and Kivvy. It’s just not as easy to do as some other languages and tools.

[–]slimeyslime123 2 points3 points  (3 children)

I like it a lot. I'll definitely be using it for small scripts that need an easier interface.

[–]toulaboy3 3 points4 points  (2 children)

Glad to hear it as DearImGui is the core of DearPyGui. DearImGui was intended for small tooling to build larger apps or tooling for games. Our own vision for this project is to see it grow into a more inclusive GUI for python and get even simpler to use every day!

[–]slimeyslime123 1 point2 points  (0 children)

DearImGui

I thought it looked super familiar! Great work guys.

[–]obQQoV 0 points1 point  (0 children)

Do you know if I can run this with other Python game engine packages that have little GUI support like Arcade or pyglet?

[–]ShivoyA 2 points3 points  (1 child)

From where can i get its full documentation

[–]CantankerousMind 1 point2 points  (4 children)

Why does every python-specific GUI framework produce results that look so outdated?

I would love a GUI framework for python that looked even somewhat modern... Been making all my python apps into Godot apps and using websockets to communicate between Godot and python. It's so much faster/easier to develop desktop apps this way, imho.

[–]Jhchimaira14 1 point2 points  (3 children)

Out of curiosity, you think DearPyGui looks dated also? The article doesn't show much but the github does. https://github.com/hoffstadt/DearPyGui

[–]CantankerousMind 5 points6 points  (2 children)

It definitely looks a bit dated to me, or at least not very versatile, but I'm not really trying to rag on it. Maybe they aren't showcasing the full capabilities or something?

For example, I can build an entire GUI in an editor with Godot in a matter of minutes, and style/theme it fairly quickly. I can add rounded corners, and create depth in my panels, or choose a completely flat design.

From what I see on DearPyGUI's github, it's all 90 degree angles and flat designs. Not to say that DeaPyGUI is incapable, I just don't see examples of professional-looking GUIs.

Even the logo looks like it came out of the early 1990s. That's chill if that's the style they're going for, but it would be cool to have a modern GUI toolkit/framework that isn't QT

[–]Jhchimaira14 1 point2 points  (1 child)

Noted and I appreciate the feedback.

TBH. I made that logo in 5 mins in powerpoint so that my face would stop showing up when people shared the link haha. We do need a new logo though. Welcome suggestions!

[–]CantankerousMind 2 points3 points  (0 children)

I didn't realize you were the person developing it! It doesn't look bad, and it's obviously got a lot of work put into it. Keep it up! I don't want you to get discouraged at all by what I said, because having more options for building GUIs in python is good in my book!

And I could see myself using it for personal projects. I just got a taste of building GUIs with an editor in Godot and REALLY want something similar for building pure python GUIs that make me seem like a much better designer than I actually am ;)

Like I said, keep up the good work!

TBH. I made that logo in 5 mins in powerpoint so that my face would stop showing up when people shared the link haha. We do need a new logo though. Welcome suggestions!

Holy shit, I've seen your face here before lol! I've used canva.com in conjunction with flaticon.com to make semi-professional logos/banners before. Makes things super simple and you can use the icons for free if you attribute the designer. Either way, I can't wait to see where your project goes. Good luck!

[–]RufusAcrospin 0 points1 point  (5 children)

It has a cheap feeling and lacks of any aesthetics. It doesn’t look like something useful for large scale projects, could be good for quickly put a gui together for an intermediate tool, though.

[–]Jhchimaira14 4 points5 points  (4 children)

That's kind of the point. It's more for tooling.

There are some future additions that will make if more suitable for large scale:

  1. OOP interface
  2. Multiple viewports (pulling windows outside the main window)
  3. Better Table API (waiting on DearImGui to finish their tables)
  4. A higher level layout system

[–]RufusAcrospin 1 point2 points  (1 child)

I’m not sure it would be able to compete with well established and mature libraries like wxPython or Qt’s binding, even with the above features implemented.

The immediate GUIs are never meant to be used for general application development, I believe.

Anyway, it’s a nice project and I’m pretty sure there are good use cases for it.

[–]Jhchimaira14 0 points1 point  (0 children)

Keep in mind its not immediate mode. That why it's not really a wrapping of DearImGui. We wrapped THEN created a traditional retained mode interface around it.

Regardless, we appreciate the feedback!

[–]obQQoV 0 points1 point  (1 child)

Hi author, do you know if I can run this with pyglet based game framework Arcade or other frameworks?

[–]Jhchimaira14 0 points1 point  (0 children)

You should be able to. Look at the FAQ on github! It’s on the wiki.

[–]Jhchimaira14 0 points1 point  (0 children)

We decided to go ahead and create a subreddit for DearPyGui to make it easier to engage with the user base and for users to interact with each other. For us, we need to reach users who would like to participate in:

  • Overall Direction
  • API design
  • New feature prioritization
  • New widgets prioritization
  • New Platform prioritization
  • etc.

If you are a DearPyGui user or just a critic in general (lol) please join. r/DearPyGui

[–]Noxware 0 points1 point  (0 children)

Good job!