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.
The full documentation can be found here.
Installation
To get the latest version from Github:
$ pip 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
Release history Release notifications | RSS feed
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.8.tar.gz
(8.3 kB
view details)
File details
Details for the file python-netbox-0.0.8.tar.gz
.
File metadata
- Download URL: python-netbox-0.0.8.tar.gz
- Upload date:
- Size: 8.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 071df04b078abc251b160f269d610401ee8323d6d9ae11cd15170cad0447954f |
|
MD5 | 1b42bdf0057c0cf152d3b194d88ec454 |
|
BLAKE2b-256 | 0e53072e0c95c3c6e69538f7d7f47ca9d7d7f8d1dee9b7026ebe5d7fc249f035 |