diff --git a/README.md b/README.md index ffde3dd..b98a96d 100644 --- a/README.md +++ b/README.md @@ -1 +1,36 @@ -# uptimekumaapi +# uptime-kuma-api + +A wrapper for the Uptime Kuma WebSocket API +--- +uptime-kuma-api is a Python wrapper for the Uptime Kuma WebSocket API. + +Installation +--- +uptime-kuma-api is available on the Python Package Index (PyPI). + +You can install it using pip: + +``` +pip install uptime_kuma_api +``` + +Examples +--- +Once you have installed the python package, you can use it to communicate with an Uptime Kuma instance. + +To do so, import `UptimeKumaApi` from the library and specify the Uptime Kuma server url, username and password to initialize the connection. + +```python +from uptime_kuma_api import UptimeKumaApi + +api = UptimeKumaApi('INSERT_URL') +api.login('INSERT_USERNAME', 'INSERT_PASSWORD') +``` + +Now you can call one of the existing methods of the instance. For example create a new monitor: + +```python +>>> result = api.add_monitor(type_=MonitorType.HTTP, name="new monitor", url="http://192.168.1.1") +>>> print(result) +{'msg': 'Added Successfully.', 'monitor_id': 1} +``` diff --git a/datacollection/.gitignore b/scripts/.gitignore similarity index 100% rename from datacollection/.gitignore rename to scripts/.gitignore diff --git a/datacollection/build_notifications.py b/scripts/build_notifications.py similarity index 100% rename from datacollection/build_notifications.py rename to scripts/build_notifications.py diff --git a/datacollection/build_params_map_notification_provider.py b/scripts/build_params_map_notification_provider.py similarity index 100% rename from datacollection/build_params_map_notification_provider.py rename to scripts/build_params_map_notification_provider.py diff --git a/datacollection/notification_providers.py.j2 b/scripts/notification_providers.py.j2 similarity index 100% rename from datacollection/notification_providers.py.j2 rename to scripts/notification_providers.py.j2 diff --git a/datacollection/requirenents.txt b/scripts/requirenents.txt similarity index 100% rename from datacollection/requirenents.txt rename to scripts/requirenents.txt