{"id":13680164,"url":"https://github.com/lucasheld/uptime-kuma-api","last_synced_at":"2025-12-14T13:11:40.020Z","repository":{"id":53252628,"uuid":"509771165","full_name":"lucasheld/uptime-kuma-api","owner":"lucasheld","description":"A Python wrapper for the Uptime Kuma Socket.IO API","archived":false,"fork":false,"pushed_at":"2024-04-05T09:49:17.000Z","size":362,"stargazers_count":314,"open_issues_count":27,"forks_count":31,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-04-14T16:53:19.092Z","etag":null,"topics":["api","kuma","monitor","monitoring","python","uptime-kuma"],"latest_commit_sha":null,"homepage":"https://uptime-kuma-api.readthedocs.io","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lucasheld.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-07-02T14:03:41.000Z","updated_at":"2025-04-12T15:34:57.000Z","dependencies_parsed_at":"2024-06-19T15:14:23.957Z","dependency_job_id":"8bdd4a1a-d9e8-4a02-92fa-4fea008222db","html_url":"https://github.com/lucasheld/uptime-kuma-api","commit_stats":{"total_commits":98,"total_committers":1,"mean_commits":98.0,"dds":0.0,"last_synced_commit":"550be17817242c4aa34d768d5a9bfc434cd80a38"},"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucasheld%2Fuptime-kuma-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucasheld%2Fuptime-kuma-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucasheld%2Fuptime-kuma-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucasheld%2Fuptime-kuma-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lucasheld","download_url":"https://codeload.github.com/lucasheld/uptime-kuma-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251599753,"owners_count":21615574,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","kuma","monitor","monitoring","python","uptime-kuma"],"created_at":"2024-08-02T13:01:13.764Z","updated_at":"2025-12-14T13:11:34.933Z","avatar_url":"https://github.com/lucasheld.png","language":"Python","funding_links":[],"categories":["Python","api"],"sub_categories":[],"readme":"# uptime-kuma-api\n\nA wrapper for the Uptime Kuma Socket.IO API\n---\nuptime-kuma-api is a Python wrapper for the [Uptime Kuma](https://github.com/louislam/uptime-kuma) Socket.IO API.\n\nThis package was developed to configure Uptime Kuma with Ansible. The Ansible collection can be found at https://github.com/lucasheld/ansible-uptime-kuma.\n\nPython version 3.7+ is required.\n\nSupported Uptime Kuma versions:\n\n| Uptime Kuma     | uptime-kuma-api |\n|-----------------|-----------------|\n| 1.21.3 - 1.23.2 | 1.0.0 - 1.2.1   |\n| 1.17.0 - 1.21.2 | 0.1.0 - 0.13.0  |\n\nInstallation\n---\nuptime-kuma-api is available on the [Python Package Index (PyPI)](https://pypi.org/project/uptime-kuma-api/).\n\nYou can install it using pip:\n\n```\npip install uptime-kuma-api\n```\n\nDocumentation\n---\nThe API Reference is available on [Read the Docs](https://uptime-kuma-api.readthedocs.io).\n\nExample\n---\nOnce you have installed the python package, you can use it to communicate with an Uptime Kuma instance.\n\nTo do so, import `UptimeKumaApi` from the library and specify the Uptime Kuma server url (e.g. 'http://127.0.0.1:3001'), username and password to initialize the connection.\n\n```python\n\u003e\u003e\u003e from uptime_kuma_api import UptimeKumaApi, MonitorType\n\u003e\u003e\u003e api = UptimeKumaApi('INSERT_URL')\n\u003e\u003e\u003e api.login('INSERT_USERNAME', 'INSERT_PASSWORD')\n```\n\nNow you can call one of the existing methods of the instance. For example create a new monitor:\n\n```python\n\u003e\u003e\u003e result = api.add_monitor(type=MonitorType.HTTP, name=\"Google\", url=\"https://google.com\")\n\u003e\u003e\u003e print(result)\n{'msg': 'Added Successfully.', 'monitorId': 1}\n```\n\nAt the end, the connection to the API must be disconnected so that the program does not block.\n\n```python\n\u003e\u003e\u003e api.disconnect()\n```\n\nWith a context manager, the disconnect method is called automatically:\n\n```python\nfrom uptime_kuma_api import UptimeKumaApi\n\nwith UptimeKumaApi('INSERT_URL') as api:\n    api.login('INSERT_USERNAME', 'INSERT_PASSWORD')\n    api.add_monitor(\n        type=MonitorType.HTTP,\n        name=\"Google\",\n        url=\"https://google.com\"\n    )\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucasheld%2Fuptime-kuma-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flucasheld%2Fuptime-kuma-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucasheld%2Fuptime-kuma-api/lists"}