Skip to content

[QUESTION]: Nanobind Python Stubs #60

@nyckmaia

Description

@nyckmaia

Problem description

I would like to build a C++/nanobind library that contains Python stubs, to be able to easy to use it, like the great native Python libraries (example: pandas, numpy, os, etc)

01 - Auto-complete drop down menu

The main idea is to get the auto-complete drop down inside code editors like VS Code.

Example:

import myLib

obj  = myLib.MyClass()
obj. # here will show the drop down menu showing the MyClass public methods

02 - C++ Function Signatures in Python environment

Another thing is to have the functions signatures to be able to see in VS Code how many input arguments each C++ function expect.

Example:

import myLib

obj = myLib.myClass()
obj.foo(    # here the editor shows the function signature

Question

Is there a way to get these 2 features above using nanobind?

Thank you,

Reproducible example code

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions