Skip to main content

Python NetBox Client

Project description

python-netbox is a client for the Netbox (https://github.com/digitalocean/netbox) API. It’s based on the APIv2 which is released since version 2.0.0. It requires python 3.

The full documentation can be found here.

Installation

To get the latest version from Github:

$ pip3 install python-netbox

Usage

To start with the module:

>>> from netbox import NetBox
>>> netbox = NetBox(host='127.0.0.1', port=32768, use_ssl=False, auth_token='token')

Examples

Get all devices:

>>> netbox.dcim.get_devices()

Get devices per rack:

>>> netbox.dcim.get_devices_per_rack('rack_name')

Get device by name

>>> netbox.dcim.get_devices(name='device_name')

Create a site:

>>> netbox.dcim.create_site('site1', 'site1')

Delete a site:

>>> netbox.dcim.delete_site('site1')

Get IP address object:

>>> netbox.ipam.get_ip(device='device_name', interface_id=interface_id)

Support

If you have questions or comments please send an email to thomas@tjrb.nl

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python-netbox-0.0.11.tar.gz (8.8 kB view details)

Uploaded Source

Built Distribution

python_netbox-0.0.11-py3-none-any.whl (11.9 kB view details)

Uploaded Python 3

File details

Details for the file python-netbox-0.0.11.tar.gz.

File metadata

File hashes

Hashes for python-netbox-0.0.11.tar.gz
Algorithm Hash digest
SHA256 74f61f8c30b7ffcf730bfbf0517950487c21f80d817546d9402de4f98d2bf013
MD5 bb81765bcca17e6f3ff17ca1c2994e2a
BLAKE2b-256 64988cac6c86b40a59db253c5dd166315c4b1f5116fb6ebec420ff37528f6921

See more details on using hashes here.

File details

Details for the file python_netbox-0.0.11-py3-none-any.whl.

File metadata

File hashes

Hashes for python_netbox-0.0.11-py3-none-any.whl
Algorithm Hash digest
SHA256 674d6874fd7f9e7f791cd461e5ad1e0f1088ab4f75d72e37939f2d179eab1d58
MD5 c4b773e1820f717ba3113fbc6aa5a46d
BLAKE2b-256 bfcff72c2beeca84db3e06fc9790bdc13f4e0d5f7a07b000eed326740093e483

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page