{"id":44059650,"url":"https://github.com/d-k-bo/python-gotify","last_synced_at":"2026-02-08T01:08:41.449Z","repository":{"id":45926750,"uuid":"371514649","full_name":"d-k-bo/python-gotify","owner":"d-k-bo","description":"Python library to access your gotify server","archived":false,"fork":false,"pushed_at":"2024-07-22T03:24:31.000Z","size":87,"stargazers_count":30,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-01-13T03:41:17.457Z","etag":null,"topics":["api-client","async","asyncio","gotify","httpx","push-notifications","python","self-hosted","websockets"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/gotify/","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/d-k-bo.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}},"created_at":"2021-05-27T22:03:38.000Z","updated_at":"2025-12-23T04:23:41.000Z","dependencies_parsed_at":"2022-09-23T09:25:17.831Z","dependency_job_id":null,"html_url":"https://github.com/d-k-bo/python-gotify","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/d-k-bo/python-gotify","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d-k-bo%2Fpython-gotify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d-k-bo%2Fpython-gotify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d-k-bo%2Fpython-gotify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d-k-bo%2Fpython-gotify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/d-k-bo","download_url":"https://codeload.github.com/d-k-bo/python-gotify/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d-k-bo%2Fpython-gotify/sbom","scorecard":{"id":315328,"data":{"date":"2025-08-11","repo":{"name":"github.com/d-k-bo/python-gotify","commit":"1a56feea2147247a5cfc306c8e84be21f34ebdf1"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.1,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/22 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/ci.yml:1","Warn: no topLevel permission defined: .github/workflows/release.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:37: update your workflow using https://app.stepsecurity.io/secureworkflow/d-k-bo/python-gotify/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:38: update your workflow using https://app.stepsecurity.io/secureworkflow/d-k-bo/python-gotify/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:52: update your workflow using https://app.stepsecurity.io/secureworkflow/d-k-bo/python-gotify/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:53: update your workflow using https://app.stepsecurity.io/secureworkflow/d-k-bo/python-gotify/ci.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:61: update your workflow using https://app.stepsecurity.io/secureworkflow/d-k-bo/python-gotify/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/d-k-bo/python-gotify/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/d-k-bo/python-gotify/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/d-k-bo/python-gotify/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/d-k-bo/python-gotify/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/d-k-bo/python-gotify/release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/d-k-bo/python-gotify/release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:29: update your workflow using https://app.stepsecurity.io/secureworkflow/d-k-bo/python-gotify/release.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:30: update your workflow using https://app.stepsecurity.io/secureworkflow/d-k-bo/python-gotify/release.yml/main?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/ci.yml:32","Warn: pipCommand not pinned by hash: .github/workflows/ci.yml:43","Warn: pipCommand not pinned by hash: .github/workflows/ci.yml:58","Warn: pipCommand not pinned by hash: .github/workflows/ci.yml:21","Warn: pipCommand not pinned by hash: .github/workflows/release.yml:21","Info:   0 out of  11 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   2 third-party GitHubAction dependencies pinned","Info:   0 out of   5 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact v0.5.0 not signed: https://api.github.com/repos/d-k-bo/python-gotify/releases/68862719","Warn: release artifact v0.4 not signed: https://api.github.com/repos/d-k-bo/python-gotify/releases/61917793","Warn: release artifact v0.5.0 does not have provenance: https://api.github.com/repos/d-k-bo/python-gotify/releases/68862719","Warn: release artifact v0.4 does not have provenance: https://api.github.com/repos/d-k-bo/python-gotify/releases/61917793"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 9 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-18T00:04:32.522Z","repository_id":45926750,"created_at":"2025-08-18T00:04:32.522Z","updated_at":"2025-08-18T00:04:32.522Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29216082,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-08T00:10:47.190Z","status":"ssl_error","status_checked_at":"2026-02-08T00:10:43.589Z","response_time":63,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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-client","async","asyncio","gotify","httpx","push-notifications","python","self-hosted","websockets"],"created_at":"2026-02-08T01:08:40.772Z","updated_at":"2026-02-08T01:08:41.443Z","avatar_url":"https://github.com/d-k-bo.png","language":"Python","readme":"# python-gotify\n\n[![PyPI](https://img.shields.io/pypi/v/gotify.svg?logo=pypi)](https://pypi.python.org/pypi/gotify)\n[![Python](https://img.shields.io/pypi/pyversions/gotify.svg?logo=python)](https://pypi.python.org/pypi/gotify)\n[![License](https://img.shields.io/pypi/l/gotify.svg)](https://pypi.python.org/pypi/gotify)\n[![Code Style](https://img.shields.io/badge/code%20style-black-black)](https://github.com/psf/black)\n![CI](https://github.com/d-k-bo/python-gotify/actions/workflows/ci.yml/badge.svg)\n[![Codecov](https://img.shields.io/codecov/c/github/d-k-bo/python-gotify)](https://app.codecov.io/gh/d-k-bo/python-gotify)\n\npython-gotify is a python client library to interact with your [gotify](https://github.com/gotify/server) server without having to handle requests manually.\n\nIt offers both a synchronous and an asynchronous interface powered by [httpx](https://www.python-httpx.org/).\nOptionally, push messages can be received via websockets.\n\n## Installation\n\npython-gotify can be installed from [PyPi](https://pypi.org/project/gotify/) using pip:\n\n```\npip install gotify\n```\n\nIf you want to listen to push messages, the additional dependency on [websockets](https://websockets.readthedocs.io/en/stable/) can be installed with\n\n```\npip install gotify[stream]\n```\n\n## Usage\n\nTo send messages:\n\n```python\nfrom gotify import Gotify\n\ngotify = Gotify(\n    base_url=\"https://gotify.example.com\",\n    app_token=\"AsWIJhvlHb.xgKe\",\n)\n\ngotify.create_message(\n    \"Hello you wonderful people!\",\n    title=\"Hello World\",\n    priority=0,\n)\n```\n\n**Note:** To send messages you need to create a new application and set `app_token` accordingly.\n\nYou can also manage things like applications:\n\n```python\nfrom gotify import Gotify\n\ngotify = Gotify(\n    base_url=\"https://gotify.example.com\",\n    client_token=\"CoLwHBCAr8z2MMA\",\n)\n\napp = gotify.create_application(\"foobar\", description=\"test application\")\n\nprint(\"Created new application:\", app)\n```\n\nwould result in\n\n```plain\nCreated new application: {'id': 42, 'token': 'ArHD_yGYf63-A13', 'name': 'foobar', 'description': 'test application', 'internal': False, 'image': 'static/defaultapp.png'}\n```\n\n**Note:** For most things you need to create a new client and set `client_token` accordingly.\n\nThis library tries to implement every endpoint of the gotify API as an instance method of the `Gotify` class.\n\nMore details about the capabilities of gotify's API can be found in its [API documentation](https://gotify.net/api-docs).\n\n**Note:** since I don't use any gotify plugins, plugin-related functions are currently completely untested.\n\n### Async Usage\n\npython-gotify's asynchronous client works similar to the synchronous one, you just need to `await` all methods. It is recommended to use it as a context manager if you want to send multiple requests.\n\n```python\nimport asyncio\nfrom gotify import AsyncGotify\n\nasync def send_message_async():\n    async_gotify = AsyncGotify(\n        base_url=\"https://gotify.example.com\",\n        app_token=\"AsWIJhvlHb.xgKe\",\n    )\n\n    await async_gotify.create_message(\n        \"This message was sent asynchronously!\",\n        title=\"Hello Asynchronous World\",\n    )\n\nasyncio.run(send_message_async())\n```\n\n### Reusing HTTP sessions\n\nIf you want to send multiple requests to a server you can use both `Gotify` and `AsyncGotify` as a (asynchronous) context manager which will use a single HTTP session to reduce some connection overhead.\n\n```python\nwith Gotify(...) as gotify:\n    ...\n\nasync with AsyncGotify(...) as async_gotify:\n    ...\n```\n\n### Receive push messages via websockets\n\n`AsyncGotify` implements gotify's `/stream` endpoint which allows to receive push messages via websockets. To use it make sure you installed python-gotify with `pip install gotify[stream]`.\n\n`AsyncGotify.stream()` is implemented as an asynchronous generator that waits for incoming messages and yields `Message` dictionaries.\n\n```python\nimport asyncio\nfrom gotify import AsyncGotify\n\nasync def log_push_messages():\n    async_gotify = AsyncGotify(\n        base_url=\"https://gotify.example.com\",\n        client_token=\"CoLwHBCAr8z2MMA\",\n    )\n\n    async for msg in async_gotify.stream():\n        print(msg)\n\nasyncio.run(log_push_messages())\n```\n\n## Contributing\n\nPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.\n\nPlease use [nox](https://nox.thea.codes/en/stable/tutorial.html#installation) to format, lint, type-check and test your code by calling `nox` in your project directory.\n\nThe test suite downloads a server binary and starts a preconfigured test server on port 30080 (this doesn't work on MacOS). If you encounter issues starting the test server, please create an issue.\n\n## License\n\nThis project is licensed under the MIT License.\n\nSee [LICENSE](LICENSE) for more information.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fd-k-bo%2Fpython-gotify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fd-k-bo%2Fpython-gotify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fd-k-bo%2Fpython-gotify/lists"}