Upbge-stubs is now available on PyPI, providing type hinting for popular IDEs

Hi, I’ve been working on a new FOSS project called bpystubgen for a while.

As the name suggests, it is an API stub generator for UPBGE and Blender, which produces a Python module you can install to make your IDE provide auto-completion and documentation support for relevant APIs:


(Auto-completion at work in PyCharm)


(Pop-up documentation shown in VSCode)

For UPBGE, you can install upbge-stubs with a package manager like pipenv or pip as explained on the homepage.

Currently, the module is available for the upcoming UPBGE 0.3 release, and a snapshot is published to PyPI daily.

I’d appreciate it if you could try it and let me know how it works. In case you have suggestions or encountered a problem, please give me feedback using the project’s issue tracker.

Thanks!

8 Likes

I found that recent 0.3.0.24.* snapshots have a regression that prevents stubs for some important types like KX_GameObject from being generated.

Updating to the latest 0.3.0.25.* version will fix the problem.

Sorry for the inconvenience, and please report issues if you find any.

Thanks!

2 Likes