Skip to main content

Python3 module to interact with UptimeRobot API.

Project description

Python Module for Uptime Robot
==============================

Python3 module to interact with UptimeRobot API

Installation
------------

To get the latest stable release from PyPi

.. code:: bash

$ pip install upytimerobot

To get the latest commit from GitLab

.. code:: bash

$ pip install -e git+git://gitlab.com/fboaventura/upytimerobot.git#egg=uptimerobot

Usage
-----

Use with Python:

.. code:: python

>>> from upytimerobot import UptimeRobot
>>> up = UptimeRobot(api_key=UPTIME_ROBOT_API_KEY)
>>> up.get_monitors()
{'stat': 'ok', 'pagination': {'offset': 0, 'limit': 1, 'total': 4}, 'monitors': [{'id': 90909090, 'friendly_name': 'my_monitor', 'url': '127.0.0.1', 'type': 3, 'sub_type': '', 'keyword_type': '', 'keyword_value': '', 'http_username': '', 'http_password': '', 'port': '', 'interval': 300, 'status': 2, 'ssl': {'brand': '', 'product': None, 'expires': 0}, 'create_datetime': 1480809958}]}

ToDo
----
- Add support to edit existing Monitors
- Add support to delete existing Monitors
- Add support to add new Alert Contacts
- Add support to edit existing Alert Contacts
- Add support to delete existing Alert Contacts
- Add support to add new Maintenance Windows
- Add support to edit existing Maintenance Windows
- Add support to delete existing Maintenance Windows
- Add support to add new Public Status Pages
- Add support to edit existing Public Status Pages
- Add support to delete existing Public Status Pages
- Make the module work as a standalone script

History
-------

[0.2.1] - 2018-06-28
--
Some work was made toward improving the collection of monitors by type, status, etc..

Added
--
- `.add_monitor` to add new monitors
- `.add_http_monitor` to add http/https monitors
- `.add_ping_monitor` to add ping monitors
- `.add_port_monitor` to add port monitors
- File `add_monitor.py` to serve as example of what can be achieved

Changed
--
- `Changelog` texts to be more clear
- FIX: `get_monitor_by_status` is now working properly
- FIX: `get_monitor_by_type` is now working properly

[0.1.0] - 2018-06-18
---
This is functional module already, one can query all the information regarding `account`, `monitors`, `alert contacts`, `maintenance windows` and `public status pages`.

Also, the functions are all well documented, containing all the possible parameters that can be used to each of the queries available.

Added
--
- Add `constants` file to hold parameters options and other constants that will be used

Changed
--
- Renamed some internal usage methods to differentiate from the public ones
- Improved documentation on the existing methods
- The importing of some libraries
- `.get_monitors_by_name`: Changed validation if a monitor was recovered
- `.get_monitors_by_id`: Changed validation if a monitor was recovered
- Changed the name of the methods to a more pythonic naming:
- `.getMonitors` -> `.get_monitors`
- `.getAccountDetails` -> `.get_account_details`
- `.getAlertContacts` -> `.get_alert_contacts`
- `.getMWindows` -> `.get_mwindows`
- `.getPSPs` -> `.get_psps`


About the API
-------------

The full API is documented here: https://uptimerobot.com/api


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

upytimerobot-0.2.1.tar.gz (10.9 kB view details)

Uploaded Source

Built Distribution

upytimerobot-0.2.1-py3-none-any.whl (11.1 kB view details)

Uploaded Python 3

File details

Details for the file upytimerobot-0.2.1.tar.gz.

File metadata

File hashes

Hashes for upytimerobot-0.2.1.tar.gz
Algorithm Hash digest
SHA256 a7d6a7f535472992551a12bee9b8ad66e020e3cd87c919c4a8f44dcc970d1dad
MD5 c78b16015aa1e79c93176ca2eb8dd922
BLAKE2b-256 405431f4c9e53f9d54b6b734acd1271d3cb1d54e48a72f88a06eb417bfaf6822

See more details on using hashes here.

File details

Details for the file upytimerobot-0.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for upytimerobot-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 08119d6b0e2db1bd12d043d82d88e198ed06108774133fb10f274ddbc5c69cd1
MD5 0a5ecb455f1971695c66db20050e578c
BLAKE2b-256 6d08490fe17db062603ef2dfd07fa63922957509f06581c7d29e19043e14edcd

See more details on using hashes here.

Supported by

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