Registry / devops / imgui
library2.0.0pypypiunverified

Cython-based Python bindings for dear imgui (Bloat-free Immediate Mode Graphical User Interface). Version 2.0.0 uses a significantly changed API compared to 1.x; release cadence is irregular.

pip install imgui[full]
INSTALL
IMPORT
SIG · IMGUI
I
imgui
devopspythonv2.0.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ImGui
import imgui
Top-level module is 'imgui', not 'imgui.core' or 'PyImGui'.

Minimal GLFW+OpenGL example creating a window with a main menu bar and test window.

import imgui from imgui.integrations.glfw import GlfwRenderer import glfw def main(): imgui.create_context() window = impl_glfw_init() impl = GlfwRenderer(window) while not glfw.window_should_close(window): glfw.poll_events() impl.process_inputs() imgui.new_frame() if imgui.begin_main_menu_bar(): if imgui.begin_menu("File", True): clicked_quit, _ = imgui.menu_item("Quit", "Cmd+Q", False, True) if clicked_quit: exit(0) imgui.end_menu() imgui.end_main_menu_bar() imgui.show_test_window() imgui.render() impl.render(imgui.get_draw_data()) impl.shutdown() glfw.terminate() def impl_glfw_init(): width, height = 1280, 720 window_name = "minimal ImGui/GLFW example" if not glfw.init(): return None glfw.window_hint(glfw.CONTEXT_VERSION_MAJOR, 3) glfw.window_hint(glfw.CONTEXT_VERSION_MINOR, 3) glfw.window_hint(glfw.OPENGL_PROFILE, glfw.OPENGL_CORE_PROFILE) glfw.window_hint(glfw.OPENGL_FORWARD_COMPAT, glfw.TRUE) window = glfw.create_window(int(width), int(height), window_name, None, None) glfw.make_context_current(window) if not window: glfw.terminate() return None return window if __name__ == "__main__": main()
Debug
Known issues
breakingv2.0.0 changed the core API: 'begin()' now returns a tuple (expanded, expanded) instead of the previous pattern. Use 'expanded, _ = imgui.begin("Window")'.
fix
Adapt all calls to imgui.begin() to unpack both values.
affects: >=2.0.0
breakingv2.0.0 removed the old 'imgui.core' module; all symbols are now directly under 'imgui'.
fix
Change 'from imgui.core import *' to 'import imgui'.
affects: >=2.0.0
gotchaIntegration backends (GLFW, SDL2, etc.) are separate packages or require manual installation of the corresponding system libraries.
fix
Install with 'pip install imgui[glfw]' or 'pip install imgui[sdl2]'.
affects: all
Upgrade
Version history
2.0.0latest on PyPI · released Apr 19, 2023
Audit
Dependencies
PyOpenGLoptionalRequired for OpenGL renderer backend.
glfwoptionalRequired for GLFW window backend.
Agent activity
6 hits · last 30 days
node
6
Resources
imgui — pip install imgui · libregistry