Metadata-Version: 2.4
Name: imgui-stubs
Version: 2.0.0.20260513
Summary: Type stubs for the pyimgui (imgui) Python binding
Project-URL: Homepage, https://git.autourdeminuit.com/autour_de_minuit/imgui-stubs
Project-URL: Repository, https://git.autourdeminuit.com/autour_de_minuit/imgui-stubs
Project-URL: Issues, https://git.autourdeminuit.com/autour_de_minuit/imgui-stubs/issues
Author: Joseph HENRY
Author-email: Autour de Minuit <tech@autourdeminuit.com>
License-Expression: MIT
License-File: LICENSE
Keywords: autocomplete,imgui,pyimgui,stubs,typing
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Stubs Only
Requires-Python: >=3.11
Description-Content-Type: text/markdown

# imgui-stubs

Strict type stubs for the [pyimgui](https://github.com/pyimgui/pyimgui) (`imgui`) Python binding.

Provides autocomplete, type checking, and inline documentation for `imgui` and `imgui.integrations.base`. Generated stubs pass [basedpyright](https://docs.basedpyright.com) `all` mode with zero `typing.Any`.

## Installation

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

```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:

```bash
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](LICENSE)

---

Made with ❤ at [Autour de Minuit (ADV)](https://blog.autourdeminuit.com/)
