lupaxa-pushit 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,25 @@
1
+ # OS
2
+ .DS_Store
3
+
4
+ # Cursor
5
+ .cursor/
6
+ .superpowers/
7
+ .worktrees/
8
+ cursor-docs
9
+
10
+ # Make
11
+ .makefiles/
12
+
13
+ # MkDocs
14
+ site/
15
+
16
+ # Python
17
+ .coverage
18
+ .venv/
19
+ __pycache__/
20
+ .mypy_cache/
21
+ .ruff_cache/
22
+ .pytest_cache/
23
+ dist/
24
+ build/
25
+ *.egg-info/
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) The Lupaxa Project
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,148 @@
1
+ Metadata-Version: 2.5
2
+ Name: lupaxa-pushit
3
+ Version: 0.1.0
4
+ Summary: Send Pushover notifications.
5
+ Project-URL: Homepage, https://pushit.thelupaxaproject.org/
6
+ Project-URL: Documentation, https://pushit.thelupaxaproject.org/
7
+ Project-URL: Repository, https://github.com/lupaxa-notifications-toolbox/pushit
8
+ Project-URL: Issues, https://github.com/lupaxa-notifications-toolbox/pushit/issues
9
+ Author: The Lupaxa Project
10
+ License: MIT License
11
+
12
+ Copyright (c) The Lupaxa Project
13
+
14
+ Permission is hereby granted, free of charge, to any person obtaining a copy
15
+ of this software and associated documentation files (the "Software"), to deal
16
+ in the Software without restriction, including without limitation the rights
17
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
18
+ copies of the Software, and to permit persons to whom the Software is
19
+ furnished to do so, subject to the following conditions:
20
+
21
+ The above copyright notice and this permission notice shall be included in all
22
+ copies or substantial portions of the Software.
23
+
24
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
25
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
26
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
27
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
28
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
29
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
30
+ SOFTWARE.
31
+ License-File: LICENCE
32
+ Keywords: cli,notifications,pushover
33
+ Classifier: Development Status :: 3 - Alpha
34
+ Classifier: Environment :: Console
35
+ Classifier: Intended Audience :: Developers
36
+ Classifier: Intended Audience :: System Administrators
37
+ Classifier: License :: OSI Approved :: MIT License
38
+ Classifier: Operating System :: OS Independent
39
+ Classifier: Programming Language :: Python :: 3
40
+ Classifier: Programming Language :: Python :: 3.13
41
+ Classifier: Programming Language :: Python :: 3.14
42
+ Classifier: Topic :: Communications :: Chat
43
+ Classifier: Topic :: Utilities
44
+ Requires-Python: >=3.13
45
+ Requires-Dist: pyyaml>=6
46
+ Requires-Dist: requests>=2.32
47
+ Provides-Extra: dev
48
+ Requires-Dist: bump-my-version>=1.2.0; extra == 'dev'
49
+ Requires-Dist: hatch>=1.12.0; extra == 'dev'
50
+ Requires-Dist: mkdocs-material==9.7.7; extra == 'dev'
51
+ Requires-Dist: mkdocs==1.6.1; extra == 'dev'
52
+ Requires-Dist: mypy>=1.12.0; extra == 'dev'
53
+ Requires-Dist: pip-audit>=2.7.0; extra == 'dev'
54
+ Requires-Dist: pytest-cov>=5.0; extra == 'dev'
55
+ Requires-Dist: pytest>=8.0; extra == 'dev'
56
+ Requires-Dist: ruff>=0.6.0; extra == 'dev'
57
+ Provides-Extra: test
58
+ Requires-Dist: pytest-cov>=5.0; extra == 'test'
59
+ Requires-Dist: pytest>=8.0; extra == 'test'
60
+ Description-Content-Type: text/markdown
61
+
62
+ <!-- markdownlint-disable -->
63
+ <p align="center">
64
+ <a href="https://github.com/lupaxa-notifications-toolbox">
65
+ <img src="https://raw.githubusercontent.com/the-lupaxa-project/brand-assets/master/logos/organisations/notifications-toolbox/readme-logo.png" alt="Project Logo" width="256"/><br/>
66
+ </a>
67
+ </p>
68
+ <h3 align="center">
69
+ The Lupaxa Notifications Toolbox<br />
70
+ Part of The Lupaxa Project
71
+ </h3>
72
+
73
+ <br />
74
+
75
+ # lupaxa-pushit
76
+
77
+ Send Pushover notifications.
78
+
79
+ ## Features
80
+
81
+ - Send a message with an optional title and supplementary URL
82
+ - Set priority, sound, and one or more target devices
83
+ - Upload one attachment
84
+ - Configure emergency retry and expiry values
85
+ - Deliver to a Pushover group
86
+ - List available Pushover sounds
87
+ - Keep named profiles in `$HOME/.pushit.yml`
88
+ - Use the `Pushit` library class or the `pushit` command
89
+
90
+ ## Installation
91
+
92
+ ### From PyPI
93
+
94
+ ```bash
95
+ pip install lupaxa-pushit
96
+ ```
97
+
98
+ ### From source (development mode)
99
+
100
+ ```bash
101
+ pip install -e ".[dev]"
102
+ ```
103
+
104
+ Requires Python 3.13+. Runtime dependencies: `requests` and `PyYAML`.
105
+
106
+ ## Library quick start
107
+
108
+ ```python
109
+ from lupaxa.pushit import Pushit, load_profile
110
+
111
+ profile = load_profile("alerts")
112
+ client = Pushit(
113
+ profile.api_token,
114
+ user_key=profile.user_key,
115
+ timeout=profile.timeout or 10.0,
116
+ )
117
+ body = client.send_message(
118
+ "disk full",
119
+ title="pushit",
120
+ priority=2,
121
+ retry=30,
122
+ expire=3600,
123
+ group_key="GROUP_KEY",
124
+ )
125
+ client.list_sounds()
126
+ ```
127
+
128
+ ## CLI quick start
129
+
130
+ ```bash
131
+ pushit --user "$PUSHOVER_USER_KEY" --token "$PUSHOVER_API_TOKEN" --text "Hello"
132
+ pushit --profile alerts --text "Hello"
133
+ pushit -p alerts --config "$HOME/work/pushit.yml" --text "Disk full"
134
+ pushit --profile alerts --text "down" --emergency --group "$PUSHOVER_GROUP_KEY"
135
+ pushit --profile alerts --text "see" --title pushit --url https://example.com --url-title Open
136
+ pushit --profile alerts --text "see" --attachment report.png --sound pushover --device phone
137
+ pushit --token "$PUSHOVER_API_TOKEN" --sounds
138
+ python -m lupaxa.pushit --version
139
+ ```
140
+
141
+ `--text` is the message. `--emergency` and `--group` may be combined
142
+ with it. `--sounds` cannot be combined with a send. The `$PUSHOVER_*`
143
+ names are shell variables expanded before pushit runs; pushit does not
144
+ read environment variables.
145
+
146
+ <a href="https://github.com/the-lupaxa-project">
147
+ <img src="https://raw.githubusercontent.com/the-lupaxa-project/brand-assets/master/logos/components/footer-for-child-orgs.svg" alt="The Lupaxa Project Footer" width="100%" />
148
+ </a>
@@ -0,0 +1,87 @@
1
+ <!-- markdownlint-disable -->
2
+ <p align="center">
3
+ <a href="https://github.com/lupaxa-notifications-toolbox">
4
+ <img src="https://raw.githubusercontent.com/the-lupaxa-project/brand-assets/master/logos/organisations/notifications-toolbox/readme-logo.png" alt="Project Logo" width="256"/><br/>
5
+ </a>
6
+ </p>
7
+ <h3 align="center">
8
+ The Lupaxa Notifications Toolbox<br />
9
+ Part of The Lupaxa Project
10
+ </h3>
11
+
12
+ <br />
13
+
14
+ # lupaxa-pushit
15
+
16
+ Send Pushover notifications.
17
+
18
+ ## Features
19
+
20
+ - Send a message with an optional title and supplementary URL
21
+ - Set priority, sound, and one or more target devices
22
+ - Upload one attachment
23
+ - Configure emergency retry and expiry values
24
+ - Deliver to a Pushover group
25
+ - List available Pushover sounds
26
+ - Keep named profiles in `$HOME/.pushit.yml`
27
+ - Use the `Pushit` library class or the `pushit` command
28
+
29
+ ## Installation
30
+
31
+ ### From PyPI
32
+
33
+ ```bash
34
+ pip install lupaxa-pushit
35
+ ```
36
+
37
+ ### From source (development mode)
38
+
39
+ ```bash
40
+ pip install -e ".[dev]"
41
+ ```
42
+
43
+ Requires Python 3.13+. Runtime dependencies: `requests` and `PyYAML`.
44
+
45
+ ## Library quick start
46
+
47
+ ```python
48
+ from lupaxa.pushit import Pushit, load_profile
49
+
50
+ profile = load_profile("alerts")
51
+ client = Pushit(
52
+ profile.api_token,
53
+ user_key=profile.user_key,
54
+ timeout=profile.timeout or 10.0,
55
+ )
56
+ body = client.send_message(
57
+ "disk full",
58
+ title="pushit",
59
+ priority=2,
60
+ retry=30,
61
+ expire=3600,
62
+ group_key="GROUP_KEY",
63
+ )
64
+ client.list_sounds()
65
+ ```
66
+
67
+ ## CLI quick start
68
+
69
+ ```bash
70
+ pushit --user "$PUSHOVER_USER_KEY" --token "$PUSHOVER_API_TOKEN" --text "Hello"
71
+ pushit --profile alerts --text "Hello"
72
+ pushit -p alerts --config "$HOME/work/pushit.yml" --text "Disk full"
73
+ pushit --profile alerts --text "down" --emergency --group "$PUSHOVER_GROUP_KEY"
74
+ pushit --profile alerts --text "see" --title pushit --url https://example.com --url-title Open
75
+ pushit --profile alerts --text "see" --attachment report.png --sound pushover --device phone
76
+ pushit --token "$PUSHOVER_API_TOKEN" --sounds
77
+ python -m lupaxa.pushit --version
78
+ ```
79
+
80
+ `--text` is the message. `--emergency` and `--group` may be combined
81
+ with it. `--sounds` cannot be combined with a send. The `$PUSHOVER_*`
82
+ names are shell variables expanded before pushit runs; pushit does not
83
+ read environment variables.
84
+
85
+ <a href="https://github.com/the-lupaxa-project">
86
+ <img src="https://raw.githubusercontent.com/the-lupaxa-project/brand-assets/master/logos/components/footer-for-child-orgs.svg" alt="The Lupaxa Project Footer" width="100%" />
87
+ </a>
@@ -0,0 +1,96 @@
1
+ <p align="center">
2
+ <a href="https://github.com/lupaxa-notifications-toolbox">
3
+ <img src="https://raw.githubusercontent.com/the-lupaxa-project/brand-assets/master/logos/organisations/notifications-toolbox/readme-logo.png" alt="Notifications Toolbox" />
4
+ </a>
5
+ </p>
6
+
7
+ <h1 align="center">pushit</h1>
8
+
9
+ Send Pushover notifications.
10
+
11
+ <p align="center">
12
+ <a href="https://pushit.thelupaxaproject.org/">Documentation</a>
13
+ ·
14
+ <a href="https://github.com/lupaxa-notifications-toolbox/pushit">GitHub</a>
15
+ </p>
16
+
17
+ ## Install
18
+
19
+ ```bash
20
+ pip install lupaxa-pushit
21
+ pushit --help
22
+ ```
23
+
24
+ ## CLI
25
+
26
+ ```bash
27
+ pushit --user "$PUSHOVER_USER_KEY" --token "$PUSHOVER_API_TOKEN" --text "Hello"
28
+ pushit --profile alerts --text "Hello"
29
+ pushit -p alerts --config "$HOME/work/pushit.yml" --text "Disk full"
30
+ pushit --profile alerts --text "down" --emergency --group "$PUSHOVER_GROUP_KEY"
31
+ pushit --profile alerts --text "see" --title pushit --url https://example.com --url-title Open
32
+ pushit --profile alerts --text "see" --attachment report.png --sound pushover --device phone
33
+ pushit --token "$PUSHOVER_API_TOKEN" --sounds
34
+ python -m lupaxa.pushit --version
35
+ ```
36
+
37
+ `--text` is the message. `--emergency` and `--group` may be combined
38
+ with it. `--sounds` cannot be combined with a send. The `$PUSHOVER_*`
39
+ names are shell variables expanded before pushit runs; pushit does not
40
+ read environment variables.
41
+
42
+ ## Config
43
+
44
+ Profiles live in `$HOME/.pushit.yml`. Pass `--config` to use another
45
+ file; `--config` requires `--profile`.
46
+
47
+ ```yaml
48
+ profiles:
49
+ alerts:
50
+ user_key: USER_KEY
51
+ api_token: API_TOKEN
52
+ title: pushit
53
+ url: https://example.com/alert
54
+ url_title: Open
55
+ sound: pushover
56
+ device: phone
57
+ priority: 0
58
+ timeout: 15
59
+ retry: 30
60
+ expire: 3600
61
+ ```
62
+
63
+ ## Library
64
+
65
+ ```python
66
+ from lupaxa.pushit import Pushit, load_profile
67
+
68
+ profile = load_profile("alerts")
69
+ client = Pushit(
70
+ profile.api_token,
71
+ user_key=profile.user_key,
72
+ timeout=profile.timeout or 10.0,
73
+ )
74
+ body = client.send_message(
75
+ "disk full",
76
+ title="pushit",
77
+ priority=2,
78
+ retry=30,
79
+ expire=3600,
80
+ group_key="GROUP_KEY",
81
+ )
82
+ client.list_sounds()
83
+ ```
84
+
85
+ ## Development
86
+
87
+ ```bash
88
+ make init
89
+ make python-install-dev
90
+ make python-check
91
+ make mkdocs-serve
92
+ ```
93
+
94
+ <a href="https://github.com/the-lupaxa-project">
95
+ <img src="https://raw.githubusercontent.com/the-lupaxa-project/brand-assets/master/logos/components/footer-for-child-orgs.svg" alt="The Lupaxa Project Footer" width="100%" />
96
+ </a>
@@ -0,0 +1,23 @@
1
+ <p align="center">
2
+ <a href="https://github.com/lupaxa-notifications-toolbox">
3
+ <img src="https://raw.githubusercontent.com/the-lupaxa-project/brand-assets/master/logos/organisations/notifications-toolbox/readme-logo.png" alt="Organisation Logo" />
4
+ </a>
5
+ </p>
6
+
7
+ <h1 align="center">Core Documentation</h1>
8
+
9
+ The following documents define the standards that apply across **The Lupaxa Project**:
10
+
11
+ | Document | Purpose |
12
+ | :------------------------------------ | :---------------------------------------------------------------- |
13
+ | [Code of Conduct](CODE_OF_CONDUCT.md) | Expected behaviour and reporting procedures. |
14
+ | [How to Contribute](CONTRIBUTING.md) | Development workflow, coding standards, and contribution process. |
15
+ | [Governance](GOVERNANCE.md) | Project governance, roles, and decision-making. |
16
+ | [Maintainers](MAINTAINERS.md) | Maintainer responsibilities and expectations. |
17
+ | [Projects Overview](PROJECTS.md) | Overview of organisations, repositories, and project structure. |
18
+ | [Security Policy](SECURITY.md) | Responsible disclosure and secure development practices. |
19
+ | [Support Guide](SUPPORT.md) | How to obtain help and support. |
20
+
21
+ <a href="https://github.com/the-lupaxa-project">
22
+ <img src="https://raw.githubusercontent.com/the-lupaxa-project/brand-assets/master/logos/components/footer-for-child-orgs.svg" alt="The Lupaxa Project Footer" width="100%" />
23
+ </a>
@@ -0,0 +1,122 @@
1
+ [build-system]
2
+ requires = ["hatchling>=1.18"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "lupaxa-pushit"
7
+ dynamic = ["version"]
8
+ description = "Send Pushover notifications."
9
+ readme = "README-PYPI.md"
10
+ license = { file = "LICENCE" }
11
+ requires-python = ">=3.13"
12
+
13
+ authors = [
14
+ { name = "The Lupaxa Project" }
15
+ ]
16
+
17
+ keywords = ["pushover", "notifications", "cli"]
18
+
19
+ dependencies = [
20
+ "requests>=2.32",
21
+ "PyYAML>=6",
22
+ ]
23
+
24
+ classifiers = [
25
+ "Development Status :: 3 - Alpha",
26
+ "Environment :: Console",
27
+ "Intended Audience :: Developers",
28
+ "Intended Audience :: System Administrators",
29
+ "License :: OSI Approved :: MIT License",
30
+ "Operating System :: OS Independent",
31
+ "Programming Language :: Python :: 3",
32
+ "Programming Language :: Python :: 3.13",
33
+ "Programming Language :: Python :: 3.14",
34
+ "Topic :: Communications :: Chat",
35
+ "Topic :: Utilities",
36
+ ]
37
+
38
+ [project.urls]
39
+ Homepage = "https://pushit.thelupaxaproject.org/"
40
+ Documentation = "https://pushit.thelupaxaproject.org/"
41
+ Repository = "https://github.com/lupaxa-notifications-toolbox/pushit"
42
+ Issues = "https://github.com/lupaxa-notifications-toolbox/pushit/issues"
43
+
44
+ [project.scripts]
45
+ pushit = "lupaxa.pushit.cli:main"
46
+
47
+ [project.optional-dependencies]
48
+ dev = [
49
+ "pytest>=8.0",
50
+ "pytest-cov>=5.0",
51
+ "ruff>=0.6.0",
52
+ "mypy>=1.12.0",
53
+ "hatch>=1.12.0",
54
+ "bump-my-version>=1.2.0",
55
+ "pip-audit>=2.7.0",
56
+ "mkdocs==1.6.1",
57
+ "mkdocs-material==9.7.7",
58
+ ]
59
+ test = [
60
+ "pytest>=8.0",
61
+ "pytest-cov>=5.0",
62
+ ]
63
+
64
+ [tool.hatch.version]
65
+ path = "src/lupaxa/pushit/version.py"
66
+
67
+ [tool.hatch.build.targets.sdist]
68
+ include = [
69
+ "src/**",
70
+ "README.md",
71
+ "README-PYPI.md",
72
+ "LICENCE",
73
+ ]
74
+
75
+ [tool.hatch.build.targets.wheel]
76
+ packages = ["src/lupaxa"]
77
+
78
+ [tool.ruff]
79
+ line-length = 100
80
+ target-version = "py313"
81
+
82
+ [tool.ruff.lint]
83
+ select = ["E", "F", "I", "B", "S", "UP", "SIM", "C4", "ISC", "D", "ANN", "PT"]
84
+ ignore = [
85
+ "D200", "D201", "D202", "D203", "D204", "D205", "D206", "D207", "D208", "D209", "D210", "D211", "D212",
86
+ "ISC001",
87
+ ]
88
+
89
+ [tool.ruff.lint.per-file-ignores]
90
+ "tests/**/*.py" = ["S101", "S104", "S105", "S106", "D", "ANN001", "ANN201"]
91
+
92
+ [tool.ruff.lint.pydocstyle]
93
+ convention = "numpy"
94
+
95
+ [tool.ruff.format]
96
+ quote-style = "double"
97
+
98
+ [tool.mypy]
99
+ python_version = "3.13"
100
+ files = ["src", "tests"]
101
+ mypy_path = "src"
102
+ explicit_package_bases = true
103
+ namespace_packages = true
104
+ warn_unused_configs = true
105
+ warn_return_any = true
106
+ warn_unused_ignores = true
107
+ disallow_untyped_defs = true
108
+ follow_imports = "normal"
109
+ ignore_missing_imports = true
110
+
111
+ [tool.pytest.ini_options]
112
+ addopts = "-ra -q --disable-warnings --cov=lupaxa.pushit --cov-report=term-missing"
113
+ testpaths = ["tests"]
114
+ pythonpath = ["src"]
115
+
116
+ [tool.coverage.run]
117
+ source = ["lupaxa.pushit"]
118
+ branch = true
119
+
120
+ [tool.coverage.report]
121
+ show_missing = true
122
+ skip_empty = true
@@ -0,0 +1,18 @@
1
+ """lupaxa.pushit — send Pushover notifications."""
2
+
3
+ from __future__ import annotations
4
+
5
+ from .client import DEFAULT_TIMEOUT, Pushit
6
+ from .config import ConfigError, Profile, default_config_path, load_profile
7
+ from .version import __version__, get_version
8
+
9
+ __all__ = [
10
+ "DEFAULT_TIMEOUT",
11
+ "ConfigError",
12
+ "Profile",
13
+ "Pushit",
14
+ "__version__",
15
+ "default_config_path",
16
+ "get_version",
17
+ "load_profile",
18
+ ]
@@ -0,0 +1,8 @@
1
+ """Allow ``python -m lupaxa.pushit`` to run the CLI."""
2
+
3
+ from __future__ import annotations
4
+
5
+ from .cli import main
6
+
7
+ if __name__ == "__main__":
8
+ raise SystemExit(main())