hypersender 1.0.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.
- hypersender-1.0.0/.github/workflows/publish.yml +20 -0
- hypersender-1.0.0/.github/workflows/tests.yml +22 -0
- hypersender-1.0.0/.gitignore +8 -0
- hypersender-1.0.0/CHANGELOG.md +7 -0
- hypersender-1.0.0/CONTRIBUTING.md +31 -0
- hypersender-1.0.0/LICENSE +21 -0
- hypersender-1.0.0/PKG-INFO +78 -0
- hypersender-1.0.0/README.md +54 -0
- hypersender-1.0.0/art/hy.svg +27 -0
- hypersender-1.0.0/pyproject.toml +47 -0
- hypersender-1.0.0/src/hypersender/__init__.py +8 -0
- hypersender-1.0.0/src/hypersender/_base.py +97 -0
- hypersender-1.0.0/src/hypersender/_client.py +95 -0
- hypersender-1.0.0/src/hypersender/enterprise.py +36 -0
- hypersender-1.0.0/src/hypersender/otp.py +63 -0
- hypersender-1.0.0/src/hypersender/py.typed +0 -0
- hypersender-1.0.0/src/hypersender/sms.py +117 -0
- hypersender-1.0.0/src/hypersender/whatsapp.py +379 -0
- hypersender-1.0.0/tests/test_hypersender.py +428 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
name: publish
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
publish:
|
|
9
|
+
runs-on: ubuntu-latest
|
|
10
|
+
environment: pypi
|
|
11
|
+
permissions:
|
|
12
|
+
id-token: write # PyPI trusted publishing, no API token stored in GitHub
|
|
13
|
+
steps:
|
|
14
|
+
- uses: actions/checkout@v4
|
|
15
|
+
- uses: actions/setup-python@v5
|
|
16
|
+
with:
|
|
17
|
+
python-version: "3.13"
|
|
18
|
+
- run: pip install build
|
|
19
|
+
- run: python -m build
|
|
20
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
name: tests
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
test:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
strategy:
|
|
12
|
+
fail-fast: false
|
|
13
|
+
matrix:
|
|
14
|
+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v4
|
|
17
|
+
- uses: actions/setup-python@v5
|
|
18
|
+
with:
|
|
19
|
+
python-version: ${{ matrix.python-version }}
|
|
20
|
+
- run: pip install -e . pytest ruff
|
|
21
|
+
- run: ruff check src tests && ruff format --check src tests
|
|
22
|
+
- run: pytest
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
Thank you for your interest in contributing to the Hypersender Python SDK.
|
|
4
|
+
|
|
5
|
+
## Reporting issues
|
|
6
|
+
|
|
7
|
+
Open an issue on GitHub with a clear title, steps to reproduce, expected and actual behavior, and your Python and `hypersender` versions (`python -c "import hypersender, sys; print(sys.version, hypersender.__version__)"`).
|
|
8
|
+
|
|
9
|
+
## Pull requests
|
|
10
|
+
|
|
11
|
+
1. Fork the repository and create a branch.
|
|
12
|
+
2. Set up a virtual environment and install the package with the dev tools:
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
python -m venv .venv
|
|
16
|
+
source .venv/bin/activate
|
|
17
|
+
pip install -e . pytest ruff
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
3. Make your change and add a test in `tests/`.
|
|
21
|
+
4. Make sure the checks pass:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
ruff check src tests
|
|
25
|
+
ruff format --check src tests
|
|
26
|
+
pytest
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
5. Open a pull request describing the change.
|
|
30
|
+
|
|
31
|
+
The SDK mirrors the [Hypersender API](https://docs.hypersender.com). New methods should follow the existing style: snake_case names, keyword arguments, and a plain dict as the return value.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) Hypersender <info@hypersender.com>
|
|
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
|
|
13
|
+
all 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
|
|
21
|
+
THE SOFTWARE.
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: hypersender
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Official Python SDK for the Hypersender WhatsApp API, SMS API, and OTP API.
|
|
5
|
+
Project-URL: Homepage, https://hypersender.com
|
|
6
|
+
Project-URL: Documentation, https://docs.hypersender.com/v2/packages-and-sdks/python/installation
|
|
7
|
+
Project-URL: Repository, https://github.com/hypersender/hypersender-python
|
|
8
|
+
Project-URL: Changelog, https://github.com/hypersender/hypersender-python/blob/main/CHANGELOG.md
|
|
9
|
+
Author-email: Hypersender <info@hypersender.com>
|
|
10
|
+
License-Expression: MIT
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Keywords: hypersender,otp,python whatsapp bot,sdk,sms,sms api,whatsapp,whatsapp api,whatsapp bot,whatsapp bot python
|
|
13
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: Operating System :: OS Independent
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
18
|
+
Classifier: Topic :: Communications :: Chat
|
|
19
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
20
|
+
Classifier: Typing :: Typed
|
|
21
|
+
Requires-Python: >=3.10
|
|
22
|
+
Requires-Dist: httpx<1,>=0.25
|
|
23
|
+
Description-Content-Type: text/markdown
|
|
24
|
+
|
|
25
|
+
<p align="center"><img width="307" height="63" src="https://raw.githubusercontent.com/hypersender/hypersender-python/main/art/hy.svg" alt="Hypersender Logo"></p>
|
|
26
|
+
|
|
27
|
+
<p align="center">
|
|
28
|
+
<a href="https://pypi.org/project/hypersender/"><img src="https://img.shields.io/pypi/dm/hypersender" alt="Monthly Downloads"></a>
|
|
29
|
+
<a href="https://pypi.org/project/hypersender/"><img src="https://img.shields.io/pypi/v/hypersender" alt="Latest Stable Version"></a>
|
|
30
|
+
<a href="https://pypi.org/project/hypersender/"><img src="https://img.shields.io/pypi/pyversions/hypersender" alt="Python Versions"></a>
|
|
31
|
+
<a href="https://github.com/hypersender/hypersender-python/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-brightgreen.svg" alt="License"></a>
|
|
32
|
+
</p>
|
|
33
|
+
|
|
34
|
+
# Introduction
|
|
35
|
+
|
|
36
|
+
The official Python SDK for the Hypersender WhatsApp API, SMS API, and OTP API. Send WhatsApp messages, build a Python WhatsApp bot, send SMS from your own Android phone, and verify users with one-time codes.
|
|
37
|
+
|
|
38
|
+
# Installation
|
|
39
|
+
|
|
40
|
+
You can install the package via pip (Python 3.10+):
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
pip install hypersender
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
```python
|
|
47
|
+
from hypersender import Hypersender
|
|
48
|
+
|
|
49
|
+
hs = Hypersender() # reads HYPERSENDER_WHATSAPP_API_KEY and HYPERSENDER_WHATSAPP_INSTANCE_ID
|
|
50
|
+
hs.whatsapp.send_text("201234567890@c.us", "Hello from Python!")
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
# Official Documentation
|
|
54
|
+
|
|
55
|
+
You can find the official documentation at [Hypersender Python SDK Documentation](https://docs.hypersender.com/v2/packages-and-sdks/python/installation).
|
|
56
|
+
|
|
57
|
+
Building a WhatsApp bot in Python? Follow [Build a WhatsApp Bot in Python](https://docs.hypersender.com/v2/packages-and-sdks/python/whatsapp/whatsapp-bot) for a complete Flask and FastAPI example.
|
|
58
|
+
|
|
59
|
+
## Changelog
|
|
60
|
+
|
|
61
|
+
Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.
|
|
62
|
+
|
|
63
|
+
## Contributing
|
|
64
|
+
|
|
65
|
+
Please see [CONTRIBUTING](CONTRIBUTING.md) for details.
|
|
66
|
+
|
|
67
|
+
## Security Vulnerabilities
|
|
68
|
+
|
|
69
|
+
Please review [our security policy](../../security/policy) on how to report security vulnerabilities.
|
|
70
|
+
|
|
71
|
+
## Credits
|
|
72
|
+
|
|
73
|
+
- [Hypersender](https://github.com/hypersender)
|
|
74
|
+
- [All Contributors](../../contributors)
|
|
75
|
+
|
|
76
|
+
## License
|
|
77
|
+
|
|
78
|
+
The MIT License (MIT). Please see [License File](LICENSE) for more information.
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
<p align="center"><img width="307" height="63" src="https://raw.githubusercontent.com/hypersender/hypersender-python/main/art/hy.svg" alt="Hypersender Logo"></p>
|
|
2
|
+
|
|
3
|
+
<p align="center">
|
|
4
|
+
<a href="https://pypi.org/project/hypersender/"><img src="https://img.shields.io/pypi/dm/hypersender" alt="Monthly Downloads"></a>
|
|
5
|
+
<a href="https://pypi.org/project/hypersender/"><img src="https://img.shields.io/pypi/v/hypersender" alt="Latest Stable Version"></a>
|
|
6
|
+
<a href="https://pypi.org/project/hypersender/"><img src="https://img.shields.io/pypi/pyversions/hypersender" alt="Python Versions"></a>
|
|
7
|
+
<a href="https://github.com/hypersender/hypersender-python/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-brightgreen.svg" alt="License"></a>
|
|
8
|
+
</p>
|
|
9
|
+
|
|
10
|
+
# Introduction
|
|
11
|
+
|
|
12
|
+
The official Python SDK for the Hypersender WhatsApp API, SMS API, and OTP API. Send WhatsApp messages, build a Python WhatsApp bot, send SMS from your own Android phone, and verify users with one-time codes.
|
|
13
|
+
|
|
14
|
+
# Installation
|
|
15
|
+
|
|
16
|
+
You can install the package via pip (Python 3.10+):
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
pip install hypersender
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
```python
|
|
23
|
+
from hypersender import Hypersender
|
|
24
|
+
|
|
25
|
+
hs = Hypersender() # reads HYPERSENDER_WHATSAPP_API_KEY and HYPERSENDER_WHATSAPP_INSTANCE_ID
|
|
26
|
+
hs.whatsapp.send_text("201234567890@c.us", "Hello from Python!")
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
# Official Documentation
|
|
30
|
+
|
|
31
|
+
You can find the official documentation at [Hypersender Python SDK Documentation](https://docs.hypersender.com/v2/packages-and-sdks/python/installation).
|
|
32
|
+
|
|
33
|
+
Building a WhatsApp bot in Python? Follow [Build a WhatsApp Bot in Python](https://docs.hypersender.com/v2/packages-and-sdks/python/whatsapp/whatsapp-bot) for a complete Flask and FastAPI example.
|
|
34
|
+
|
|
35
|
+
## Changelog
|
|
36
|
+
|
|
37
|
+
Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.
|
|
38
|
+
|
|
39
|
+
## Contributing
|
|
40
|
+
|
|
41
|
+
Please see [CONTRIBUTING](CONTRIBUTING.md) for details.
|
|
42
|
+
|
|
43
|
+
## Security Vulnerabilities
|
|
44
|
+
|
|
45
|
+
Please review [our security policy](../../security/policy) on how to report security vulnerabilities.
|
|
46
|
+
|
|
47
|
+
## Credits
|
|
48
|
+
|
|
49
|
+
- [Hypersender](https://github.com/hypersender)
|
|
50
|
+
- [All Contributors](../../contributors)
|
|
51
|
+
|
|
52
|
+
## License
|
|
53
|
+
|
|
54
|
+
The MIT License (MIT). Please see [License File](LICENSE) for more information.
|