Selecting Pynetbox Version

If you have:And you need:Then you need to use:Because:
NetBox 3.2.0 or newer/api/ipam/vlan-groups/<id>/available_vlans pynetbox 6.5.0 or newerFeature was added in NetBox 3.2
NetBox 3.1.1 or newer/api/ipam/prefixes/<id>/available_ips (or _prefixes)pynetbox 6.4.1 or newerNetBox behaviour was changed, pynetbox was updated to support that
NetBox 3.1.0 or newer/api/wirelesspynetbox 6.4.0 or newerwireless app was added in pynetbox
NetBox 3.0.0 or newer/api/users/tokens/provisionpynetbox 6.3.0 or newerApi.create_token() was added in pynetbox
NetBox 2.10.0 or newer/api/statuspynetbox 5.2.0 or newerApi.status() was added in pynetbox
NetBox 2.9.0 or newer/api/userspynetbox 5.2.0 or newerusers app was added in pynetbox
NetBox 2.9.0 or newerTagspynetbox 5.1.2 or newerTag handling was changed in NetBox, pynetbox was updated to support that
Any NetBox versionpynetbox 6.6.2 or newer If you care about your NetBox environment enough to be reading this post, I’d recommend you to use the latest versions anyway

Whenever upgrading pynetbox always read the full release notes between your current version and the new version to see the affecting changes.

Reminder: You can check Api.version in your code to make it compatible with various NetBox versions if needed, for example (see also Comparing Version Numbers in Python):

import os

import pynetbox
# pkg_resources is part of setuptools
from pkg_resources import parse_version as version

token = os.getenv("NETBOX_TOKEN")
netbox = pynetbox.api("", token)

if version(netbox.version) >= version("3.1"):
    print("NetBox 3.1+ detected")
    print("Not running the latest NetBox series yet eh?")

Leave a Reply