We are not longer using this repo internally so we are deprecating it. Writing and maintaining our own stubs generator was more complex and less effective than simply using an off-the-shelf tool. For example, we switch to datamodel-code-generator internally, and we have better type coverage. Please do not use this repo anymore.
Project that contains Python stub files for pynetbox in order to allow type checking code that uses pynetbox with mypy
This module also includes stubs for the following NetBox plugins:
pip install git+https://github.com/interdotlink/pynetbox-stubs.git#egg=pynetbox-stubsEnables autocompletion:
You'll need a local NetBox running on port 8080, then run the following to get the REST API schema:
make openapi.json
python -m venv venv
. venv/bin/activate
pip install -r requirements.txt
tox -e gen,fixlintBefore raising a PR make sure that tox tests are passing:
pip install tox
tox -e gen,fixlint
tox -e lint,mypyRight now, this project is still unfinished:
- make stubs for
pynetbox.models.* - make stubs for
pynetbox.core.query - make stubs for
pynetbox.core.app.PluginsApp -
POST,POST,PATCHparameters - Detail routes like
/ipam/ip-ranges/{id}/available-ips/ - Custom fields
