librenmsapi
librenmsapi is Python client library for the LibreNMS API.
WARNING: This project is in its very early stages and lots of things may change!
The Python code (librenmsapi.py) is auto-generated from the Markdown files for the LibreNMS API documentation.
It should therefore be complete, assuming that the LibreNMS API documentation is complete.
import librenmsapi
URL = 'http://192.168.1.1'
TOKEN = '3231554f57c1d0d05c5c3c0a2da3ba8f6a1b67f2'
client = librenmsapi.LibreNMS(URL, TOKEN):
The endpoint categories (Devices, Inventory, Locations, etc.) are available as attributes of the LibreNMS class
(in lower-case) and the actual endpoints as their methods.
Required inputs must be provided as arguments, optional inputs can be supplied as keyword arguments.
Any API calls that result in an error will raise librenmsapi.ApiException.
result = client.devices.add_device(hostname='localhost', community='public')
print(result)
# [
# {
# 'agent_uptime': 0,
# 'authalgo': None,
# 'authlevel': None,
# 'authname': None,
# 'authpass': None,
# ...
# 'transport': 'udp',
# 'type': '',
# 'uptime': None,
# 'version': None}
# ],
result = client.devices.get_device('localhost')
print(result)
# [
# {
# "device_id": "1",
# "hostname": "localhost",
# ...
# "serial": null,
# "icon": null
# }
# ]
There are other Python libraries you may want to check out.
Release files for librenmsapi 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| librenmsapi-0.0.2.tar.gz | 9.2 kB | Details |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| librenmsapi-0.0.2-py3-none-any.whl | Python 3 | none | any | Details |
| librenmsapi-0.0.2-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details |
Total release size: 27.0 kB
Release files / librenmsapi-0.0.2.tar.gz
| Download URL | librenmsapi-0.0.2.tar.gz |
|---|---|
| Size | 9.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e327a15df920f50aec0f734d476d682d011a02061d1dcc2779e70d9b1632f4f5
|
|
BLAKE2b-256 checksum How to use checksums |
bbf16f211b09f1070706f603fa708718cb0141cba36e77308153c35e81e746ea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.34.2
|
Release files / librenmsapi-0.0.2-py3-none-any.whl
| Download URL | librenmsapi-0.0.2-py3-none-any.whl |
|---|---|
| Size | 9.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
15c3311f4ddead54ee3f49eacf52677df0555665099b1606dcba8868e773e236
|
|
BLAKE2b-256 checksum How to use checksums |
101e4a8c15f8f7d20498957be8bcec3f9427902ed3bd5150add0cdbb93b35ba9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.18 {"installer":{"name":"uv","version":"0.12.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Linux Mint","version":"21","id":"vanessa","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / librenmsapi-0.0.2-py2.py3-none-any.whl
| Download URL | librenmsapi-0.0.2-py2.py3-none-any.whl |
|---|---|
| Size | 8.8 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
d9003304a6af4d277a9431dc5093c7ceb39df6a7ed8f274b01edb8ffdb894ace
|
|
BLAKE2b-256 checksum How to use checksums |
38ffc3aae9babc9d7f8df604c175c8f55b0e8736d506f2aac664d741994feac2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.34.2
|