pybind11-stubgen icon indicating copy to clipboard operation
pybind11-stubgen copied to clipboard

Generate stubs for python modules

Results 30 pybind11-stubgen issues
Sort by recently updated
recently updated
newest added

Show how to use `pybind11-stubgen` as a library in a short guide with a few examples.

documentation

I'm using the [setuptools method](https://pybind11.readthedocs.io/en/stable/compiling.html?highlight=setuptools#building-with-setuptools) to build/install my pybind11-based module. I'd like to integrate [pybind11-stubgen](https://github.com/sizmailov/pybind11-stubgen) into the `setup.py`, so it creates and installs the `.pyi` after the pybind11-based module is...

question

Originated from #109 by @TheTripleV

enhancement
help wanted

Pybind11 uses `__entries` to [store provided enum-values docstrings](https://github.com/pybind/pybind11/blob/1a0ff405498b6aac4b57cf0d95670010e5e37973/include/pybind11/pybind11.h#L2177) This PR adds support for propagating these docstrings to the stubs.

My package does not use pybind11 hacky enums, but instead derives enums from `enum.Enum` using a popular [helper macro](https://gist.github.com/anntzer/96f27c0b88634dbc61862d08bff46d10). However, in that case the generated stub does not contain some...

For module-level attributes with constant values such as ``` m.attr("changeset") = py::str(VC_CHANGESET); m.attr("built") = py::str(BUILD_DATE); ``` the corresponding generated lines in the stubfile look like the following ``` changeset: str...

Fixes https://github.com/sizmailov/pybind11-stubgen/issues/232 Great tool!

I'm trying pybind-stubgen on libtorrent, which apparently uses Boost::python. ``` $ pybind11-stubgen --ignore-all-errors libtorrent Traceback (most recent call last): File "/home/lenard/git/torrent/venv/bin/pybind11-stubgen", line 8, in sys.exit(main()) File "/home/lenard/git/torrent/venv/lib/python3.10/site-packages/pybind11_stubgen/__init__.py", line 319, in...

When I run pybind11-stubgen, I see ouput: ``` class SimpleSetupArrayOutput(SimpleSetupEntity): def getDataType(self) -> DATA_TYPE: ... class SimpleSetupEntity: def getName(self) -> str: ... This is out of order because the SimpleSetupArrayOutput...

This enables calling stubgen from a python script.