imgui-stubs (2.0.0.20260513)

Published 2026-05-13 14:26:36 +02:00 by joseph.henry

Installation

pip install --index-url  imgui-stubs

About this package

Type stubs for the pyimgui (imgui) Python binding

imgui-stubs

Strict type stubs for the pyimgui (imgui) Python binding.

Provides autocomplete, type checking, and inline documentation for imgui and imgui.integrations.base. Generated stubs pass basedpyright all mode with zero typing.Any.

Installation

The package is published to ADM's Gitea PyPI registry. In pyproject.toml:

[[tool.uv.index]]
name = "adm-gitea"
url = "https://git.autourdeminuit.com/api/packages/autour_de_minuit/pypi/simple/"
explicit = true

[tool.uv.sources]
imgui-stubs = { index = "adm-gitea" }

[project]
dependencies = [
    "imgui-stubs>=2.0.0",
]

Authenticate with UV_INDEX_ADM_GITEA_USERNAME / UV_INDEX_ADM_GITEA_PASSWORD (a Gitea personal access token with read:package scope works as the password).

Features

  • Strict signatures — zero typing.Any usage
  • Context-manager return types for begin_* / end_* pairs (with imgui.begin(...) is type-checked)
  • Full flag enums (WINDOW_*, TABLE_*, TREE_NODE_*, POPUP_*, SELECTABLE_*, COMBO_*, COLOR_EDIT_*, INPUT_TEXT_*, …)
  • imgui.integrations.base.BaseOpenGLRenderer typed for custom renderer backends

Versioning

Follows the typeshed convention for third-party stub distributions:

<pyimgui-version>.<YYYYMMDD>

Example: 2.0.0.20260513 targets pyimgui 2.0.0 and was published on 2026-05-13. The leading three components change only when pyimgui upstream releases a new version.

Publishing

Build and upload to the Gitea registry:

GITEA_PUBLISH_TOKEN=... uv run python publish.py

The script reads [tool.imgui-stubs].pyimgui_version from pyproject.toml, stamps the current date onto it, and uploads via uv publish --publish-url .... The token must be a Gitea personal access token with write:package scope.

When pyimgui upstream releases a new version, edit [tool.imgui-stubs].pyimgui_version in pyproject.toml and re-publish.

Disclaimer

This project was coded with assistance of AI.

License

MIT


Made with ❤ at Autour de Minuit (ADV)

Requirements

Requires Python: >=3.11
Details
PyPI
2026-05-13 14:26:36 +02:00
3
Joseph HENRY
28 KiB
Assets (2)
Versions (1) View all
2.0.0.20260513 2026-05-13