Skip to main content

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.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for librenmsapi 0.0.3
File Interpreter ABI Platform
librenmsapi-0.0.3-py3-none-any.whl Python 3 none any Details

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}

Release history Release notifications | RSS feed

This release

0.0.3 This release

1 release file

0.0.2

3 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page