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.
Metadata
Release files for librenmsapi 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| librenmsapi-0.0.3-py3-none-any.whl | Python 3 | none | any | Details for librenmsapi-0.0.3-py3-none-any.whl |
Release files / librenmsapi-0.0.3-py3-none-any.whl
| Download URL | librenmsapi-0.0.3-py3-none-any.whl |
|---|---|
| Size | 9.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
08a81c084c3ed1cf735511e2656cf2b97fd02c3556e9891c3307068ca9db8349
|
|
BLAKE2b-256 checksum How to use checksums |
eb522d4f3bd77636be1e8760ba2fd9b1487f98b119da501194bb34fd66acc954
|
| 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}
|
Security for librenmsapi 0.0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.