ntfy-api


Namentfy-api JSON
Version 0.0.6 PyPI version JSON
download
home_pageNone
SummaryA Python wrapper around the ntfy API.
upload_time2024-10-25 20:23:52
maintainerNone
docs_urlNone
authorNone
requires_python>=3.9
licenseApache 2.0
keywords ntfy nfty api
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            A Python wrapper around the [ntfy](https://ntfy.sh) API.

# Install
`$ pip install ntfy-api`

# Usage
This package is in its early stages, and currently only supports sending
messages:
```py
from ntfy_api import *


# create NtfyPublisher instance
ntfy_pub = NtfyPublisher("https://ntfy.example.com", basic=..., bearer=...)

# create message
msg = Message(
    topic="my-topic",
    message="**Hello World**",
    title="Super Cool Message",
    priority=Priority.urgent, # or just `5`
    tags=[Tag._100], # or just `["100"]`
    markdown=True,
    delay="10m",
    actions=[
        ViewAction(label="GOOGLE", url="https://google.com"),
        BroadcastAction(
            label="Take picture",
            extras={"cmd": "pic", "camera": "front"}
        )
    ],
    click="https://youtube.com",
    attach="https://docs.ntfy.sh/static/img/ntfy.png",
    filename="ntfy.png",
    icon="https://ntfy.sh/_next/static/media/logo.077f6a13.svg"
)

# send message
ntfy_pub.publish(msg)

# OR

ntfy_pub << msg
```

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "ntfy-api",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": "Tanner Corcoran <tannerbcorcoran@gmail.com>",
    "keywords": "ntfy, nfty API",
    "author": null,
    "author_email": "Tanner Corcoran <tannerbcorcoran@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/e7/58/bb3fc9c32fc2eadb8bbe0fc0e84d11094141d09dbeaf5c55e4195ef381ac/ntfy_api-0.0.6.tar.gz",
    "platform": null,
    "description": "A Python wrapper around the [ntfy](https://ntfy.sh) API.\n\n# Install\n`$ pip install ntfy-api`\n\n# Usage\nThis package is in its early stages, and currently only supports sending\nmessages:\n```py\nfrom ntfy_api import *\n\n\n# create NtfyPublisher instance\nntfy_pub = NtfyPublisher(\"https://ntfy.example.com\", basic=..., bearer=...)\n\n# create message\nmsg = Message(\n    topic=\"my-topic\",\n    message=\"**Hello World**\",\n    title=\"Super Cool Message\",\n    priority=Priority.urgent, # or just `5`\n    tags=[Tag._100], # or just `[\"100\"]`\n    markdown=True,\n    delay=\"10m\",\n    actions=[\n        ViewAction(label=\"GOOGLE\", url=\"https://google.com\"),\n        BroadcastAction(\n            label=\"Take picture\",\n            extras={\"cmd\": \"pic\", \"camera\": \"front\"}\n        )\n    ],\n    click=\"https://youtube.com\",\n    attach=\"https://docs.ntfy.sh/static/img/ntfy.png\",\n    filename=\"ntfy.png\",\n    icon=\"https://ntfy.sh/_next/static/media/logo.077f6a13.svg\"\n)\n\n# send message\nntfy_pub.publish(msg)\n\n# OR\n\nntfy_pub << msg\n```\n",
    "bugtrack_url": null,
    "license": "Apache 2.0",
    "summary": "A Python wrapper around the ntfy API.",
    "version": "0.0.6",
    "project_urls": {
        "Bug Tracker": "https://github.com/tanrbobanr/ntfy-api/issues",
        "Changelog": "https://github.com/tanrbobanr/ntfy-api/blob/main/CHANGELOG.md",
        "Documentation": "https://github.com/tanrbobanr/ntfy-api/blob/main/README.md",
        "Homepage": "https://github.com/tanrbobanr/ntfy-api",
        "License": "https://github.com/tanrbobanr/ntfy-api/blob/main/LICENSE",
        "Source": "https://github.com/tanrbobanr/ntfy-api"
    },
    "split_keywords": [
        "ntfy",
        " nfty api"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b167c523ed7a8229f1967894312df3c8e435763f9e768e7ca4ccdac489d1ebb9",
                "md5": "01d950b0f2882260d8d358c8c9b6363d",
                "sha256": "b1d207a98c3e6bb8d7db6ccc78f3930840f6533c090d544351dccd61c08bf5c8"
            },
            "downloads": -1,
            "filename": "ntfy_api-0.0.6-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "01d950b0f2882260d8d358c8c9b6363d",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 28132,
            "upload_time": "2024-10-25T20:23:51",
            "upload_time_iso_8601": "2024-10-25T20:23:51.005155Z",
            "url": "https://files.pythonhosted.org/packages/b1/67/c523ed7a8229f1967894312df3c8e435763f9e768e7ca4ccdac489d1ebb9/ntfy_api-0.0.6-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e758bb3fc9c32fc2eadb8bbe0fc0e84d11094141d09dbeaf5c55e4195ef381ac",
                "md5": "28d850ab816c49578108415348802c2e",
                "sha256": "f712b4e9ac93abf19861cd28c8ca06f21017c54749e184d1d5e4554304bf5f78"
            },
            "downloads": -1,
            "filename": "ntfy_api-0.0.6.tar.gz",
            "has_sig": false,
            "md5_digest": "28d850ab816c49578108415348802c2e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 28152,
            "upload_time": "2024-10-25T20:23:52",
            "upload_time_iso_8601": "2024-10-25T20:23:52.064959Z",
            "url": "https://files.pythonhosted.org/packages/e7/58/bb3fc9c32fc2eadb8bbe0fc0e84d11094141d09dbeaf5c55e4195ef381ac/ntfy_api-0.0.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-25 20:23:52",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "tanrbobanr",
    "github_project": "ntfy-api",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "ntfy-api"
}
        
Elapsed time: 5.05257s