Skip to content

Latest commit

 

History

History
50 lines (34 loc) · 1.18 KB

Readme.md

File metadata and controls

50 lines (34 loc) · 1.18 KB

pynetbox-stubs

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:

Installation

pip install git+https://github.com/interdotlink/pynetbox-stubs.git#egg=pynetbox-stubs

Example

Enables autocompletion:

Development & Contributing

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,fixlint

Before raising a PR make sure that tox tests are passing:

pip install tox
tox -e gen,fixlint
tox -e lint,mypy

TODOs:

Right 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, PATCH parameters
  • Detail routes like /ipam/ip-ranges/{id}/available-ips/
  • Custom fields