Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jagter/python-netbox
Python Netbox Client
https://github.com/jagter/python-netbox
Last synced: 26 days ago
JSON representation
Python Netbox Client
- Host: GitHub
- URL: https://github.com/jagter/python-netbox
- Owner: jagter
- License: apache-2.0
- Created: 2017-06-30T09:58:22.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-06-27T11:58:06.000Z (over 1 year ago)
- Last Synced: 2024-07-26T08:22:16.112Z (5 months ago)
- Language: Python
- Size: 125 KB
- Stars: 34
- Watchers: 6
- Forks: 31
- Open Issues: 10
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
- awesome-netbox - jagter/python-netbox - Python Netbox client (SDKs)
README
============================
Python Netbox Client
============================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_.
.. _here: http://python-netbox.readthedocs.io/en/latest/#
-----------------
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(rack_id=1)
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_addresses(address='10.0.0.1/16')
-----------------
Support
-----------------
If you have questions or comments please send an email to [email protected]