Official Python SDK for IPPanel API
Project description
IPPanel Python SDK
Official Python client for the IPPanel SMS API.
Installation
You can install the package via pip:
pip install ippanel-python-sdk
Usage
from ippanel import Client
# Initialize the client
client = Client("YOUR_API_KEY")
# Send a simple message via webservice
response = client.send_webservice(
message="Hello, this is a test message",
sender="YOUR_SENDER_NUMBER",
recipients=["RECIPIENT_NUMBER_1", "RECIPIENT_NUMBER_2"]
)
print(response)
# Send a pattern message
response = client.send_pattern(
pattern_code="YOUR_PATTERN_CODE",
sender="YOUR_SENDER_NUMBER",
recipient="RECIPIENT_NUMBER",
params={
"name": "John Doe",
"otp": "12345"
}
)
print(response)
# Send a voice OTP
response = client.send_votp(
code=12345,
recipient="RECIPIENT_NUMBER"
)
print(response)
API Documentation
Initialization
client = Client(api_key, base_url=None)
api_key: Your IPPanel API keybase_url(optional): Custom base URL for the API (defaults to "https://edge.ippanel.com/v1/api")
Methods
Send Web Service Message
client.send_webservice(message, sender, recipients)
message: Text message to sendsender: Sender phone numberrecipients: List of recipient phone numbers
Send Pattern Message
client.send_pattern(pattern_code, sender, recipient, params)
pattern_code: The pattern codesender: Sender phone numberrecipient: Recipient phone numberparams: Dictionary of parameters for the pattern
Send Voice OTP
client.send_votp(code, recipient)
code: OTP code (integer or string)recipient: Recipient phone number
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ippanel_python_sdk-0.1.0.tar.gz.
File metadata
- Download URL: ippanel_python_sdk-0.1.0.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
87b2cb450327e66cd3a8f24242e6538238c6a1ef1288b9e98f92723d477282c6
|
|
| MD5 |
3cfc0a25e4295229e2cd2e6cc9b1cd37
|
|
| BLAKE2b-256 |
887de39a6e2e5d519415ae288d44886767aa481c3cd25f6f702fa886a4067b60
|
File details
Details for the file ippanel_python_sdk-0.1.0-py3-none-any.whl.
File metadata
- Download URL: ippanel_python_sdk-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fbbe701a5ae6d7a3cffece536686b5c27ae480c768ae66133e64b7c257107f96
|
|
| MD5 |
6e5f8eddb9974dc1341411368be5c962
|
|
| BLAKE2b-256 |
2e26664ada9e56c880f00c3a1b005a4ce18272f9e9e5a1d7d65d1551e0ce5ce7
|