{"id":19115354,"url":"https://github.com/perchunpak/apykuma","last_synced_at":"2025-04-30T23:06:14.371Z","repository":{"id":216800308,"uuid":"742468706","full_name":"PerchunPak/apykuma","owner":"PerchunPak","description":"Small library to notify Uptime Kuma that the service is up.","archived":false,"fork":false,"pushed_at":"2024-05-26T17:09:56.000Z","size":112,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-30T23:05:16.364Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/PerchunPak.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}},"created_at":"2024-01-12T14:49:43.000Z","updated_at":"2024-05-27T10:51:11.000Z","dependencies_parsed_at":"2024-01-17T16:49:08.758Z","dependency_job_id":null,"html_url":"https://github.com/PerchunPak/apykuma","commit_stats":null,"previous_names":["perchunpak/apykuma"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PerchunPak%2Fapykuma","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PerchunPak%2Fapykuma/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PerchunPak%2Fapykuma/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PerchunPak%2Fapykuma/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PerchunPak","download_url":"https://codeload.github.com/PerchunPak/apykuma/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251795414,"owners_count":21645023,"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":[],"created_at":"2024-11-09T04:46:10.164Z","updated_at":"2025-04-30T23:06:14.305Z","avatar_url":"https://github.com/PerchunPak.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# apykuma\n\n[![Support Ukraine](https://badgen.net/badge/support/UKRAINE/?color=0057B8\u0026labelColor=FFD700)](https://www.gov.uk/government/news/ukraine-what-you-can-do-to-help)\n\n[![Build Status](https://github.com/PerchunPak/apykuma/actions/workflows/test.yml/badge.svg?branch=master)](https://github.com/PerchunPak/apykuma/actions?query=workflow%3Atest)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n[![Python support versions badge (from pypi)](https://img.shields.io/pypi/pyversions/apykuma)](https://www.python.org/downloads/)\n\nSmall library to notify Uptime Kuma that the service is up.\nOnly async applications are supported.\n\n## Usage\n\nCreate a new Push monitor on your Kuma instance:\n\n![image](https://github.com/PerchunPak/apykuma/assets/68118654/f50bbcbc-5717-40a3-8e1c-759b57d3f87a)\n\nThen, install the library:\n\n```bash\npip install apykuma\n```\n\nAnd include it in your code:\n\n```python\nimport logging\nimport apykuma\n\nawait apykuma.start(\n    # Required; URL copied from the image above\n    url=\"https://kuma.example.com/api/push/63MlSOY4CM?status=up\u0026msg=OK\u0026ping=\",\n    # Optional; default is 60 seconds\n    interval=60,\n    # Optional; sleeps for N seconds before pinging Kuma, in case if you run `apykuma` right before starting your service\n    #           (if service fails, `apykuma` won't start as well). The recommended value is 10 seconds\n    delay=0,\n    # Optional; function that is called when during ping we encourage an error\n    #           it is done to notify you about (e.g.) network errors, and to not\n    #           stop the process of pinging kuma on such errors\n    #\n    #           by default, it logs an error using `logging` library (default value is shown below),\n    #           also supports async functions\n    handle_exception=lambda e: logging.getLogger(\"apykuma\").exception(e),\n)\n```\n\nIt is important to start `apykuma` after your service starts.\n\n## Differences from `pykuma`\n\nhttps://github.com/oliverstech/pykuma\n\nThat library is great, but it has some problems:\n\n- It uses globals, which I personally don't like\n- It blocks the loop every time it sends a request, because it uses `requests` library instead of `aiohttp`. See also https://github.com/oliverstech/pykuma/issues/2.\n\n## Installing for local developing\n\n```bash\ngit clone https://github.com/PerchunPak/apykuma.git\ncd apykuma\n```\n\n### Installing `poetry`\n\nNext we need install `poetry` with [recommended way](https://python-poetry.org/docs/master/#installation).\n\nIf you use Linux, use command:\n\n```bash\ncurl -sSL https://install.python-poetry.org | python -\n```\n\nIf you use Windows, open PowerShell with admin privileges and use:\n\n```powershell\n(Invoke-WebRequest -Uri https://install.python-poetry.org -UseBasicParsing).Content | python -\n```\n\n### Installing dependencies\n\n```bash\npoetry install --no-dev\n```\n\n### Configuration\n\nAll configuration happens in `config.yml`, or with enviroment variables.\n\n### If something is not clear\n\nYou can always write me!\n\n## Thanks\n\nThis project was generated with [python-template](https://github.com/PerchunPak/python-template).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperchunpak%2Fapykuma","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fperchunpak%2Fapykuma","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperchunpak%2Fapykuma/lists"}