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. For now only the get/create/delete methods are implemented. The possibility to modify items will be implementend soon.

The full documentation can be found here.

Installation

To get the latest version from Github:

$ pip install -e git+https://github.com/jagter/python-netbox.git#egg=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_device(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.3.tar.gz (7.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

python_netbox-0.0.3-py3-none-any.whl (9.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: python-netbox-0.0.3.tar.gz
  • Upload date:
  • Size: 7.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for python-netbox-0.0.3.tar.gz
Algorithm Hash digest
SHA256 8fab6aa3039e8b6c1bd197400ce550a19fad0066f876874218d0afe386c67e45
MD5 8eece95939e72aa237e1f22d085b6cf5
BLAKE2b-256 6a2bcdf3b83bb28bca77ea6d6bf733b6d3c3207ca72a92f7f8ed978413f42925

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_netbox-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 4fad41bc9b4399a8f5a4a268a91e80251c251b98495c8c40f36efae197e5659c
MD5 2ad7953de2d5f61c17cf1fe25f374413
BLAKE2b-256 bd69665b032e489c64c1b95819bbee8cfd3219b26f59270f516c4b23939f9da1

See more details on using hashes here.

Supported by

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