Skip to main content

Client API to communicate with PRTG instance.

Project description

PyPRTG API

Python client module to communicate with PRTG instances. This module leverages PRTG's existing API and wraps it into an easy to understand Python class.

Table of Contents

Getting Started

Requirements

  • Python 3
    • Tested with version 3.9.13. Some older versions will probably work but has not been extensively tested.

Installation

pip install pyprtg-api

Usage

from prtg import ApiClient
from prtg.auth import BasicPasshash

auth = BasicPasshash('username', 'passhash')
client = ApiClient('https://prtg.instance.com', auth)

print(client.get_probe(1))
# {'objid': 1, 'objid_raw': 1, 'name': 'Probe Device', 'name_raw': 'Probe Device', 'active': True, 'active_raw': -1, 'tags': '', 'tags_raw': '', 'parentid': 0, 'parentid_raw': 0, 'priority': '3', 'priority_raw': 3, 'status': 'Up', 'status_raw': 3, 'groupnum': '7', 'groupnum_raw': 7, 'devicenum': '3', 'devicenum_raw': 3, 'location': '', 'location_raw': ''}

TODOs

  • Retrieve sensors
  • Add sensors based on template

Author

License

MIT License

Copyright (c) 2021 Computacenter Digital Innovation

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyprtg_api-0.0.20.tar.gz (10.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyprtg_api-0.0.20-py3-none-any.whl (10.2 kB view details)

Uploaded Python 3

File details

Details for the file pyprtg_api-0.0.20.tar.gz.

File metadata

  • Download URL: pyprtg_api-0.0.20.tar.gz
  • Upload date:
  • Size: 10.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.9

File hashes

Hashes for pyprtg_api-0.0.20.tar.gz
Algorithm Hash digest
SHA256 b2ac7f5b5b5c55a23089d3fdc8f77f28d15df03eae98634d079cb34076b1cf3d
MD5 3c31ed4434088e9daf5aecc0d41faf21
BLAKE2b-256 aa5bfe974fc51d15d42af59b4208c4d20adc841c12c6a80833341429a25d3d62

See more details on using hashes here.

File details

Details for the file pyprtg_api-0.0.20-py3-none-any.whl.

File metadata

  • Download URL: pyprtg_api-0.0.20-py3-none-any.whl
  • Upload date:
  • Size: 10.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.9

File hashes

Hashes for pyprtg_api-0.0.20-py3-none-any.whl
Algorithm Hash digest
SHA256 0699959c6bf81fc4b5a7c95ada04e5d7fec49fb1f080b0d7d50dff5cafef5455
MD5 87a8448f2dd3e20c58c917fb30d1e3cb
BLAKE2b-256 d804bb4cde9ae60720a5412340fb8ec5b849b6ab318adab5562365428f57cadb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page