Python SDK для работы с API GoSMS
Project description
GoSMS Python SDK
🐍 Python SDK for GoSMS.ru API – A lightweight and efficient library for interacting with the GoSMS.ru SMS gateway. Send SMS, check balances, track delivery statuses, and manage contacts with ease.
Установка
pip install gosms-ru-client
Использование
Отправка SMS
from gosms_ru_client import GoSMSClient
# Инициализация клиента
client = GoSMSClient(api_key="ваш_api_ключ")
# Отправка SMS
try:
response = client.send_sms(
phone_number="79999999999",
message="Тестовое сообщение",
device_id="device_id", # опционально
to_sim=1, # опционально
callback_id="callback_id" # опционально
)
print(response)
except GoSMSError as e:
print(f"Ошибка: {e}")
Обработка ошибок
Пакет предоставляет следующие классы исключений:
GoSMSError- базовый класс для всех исключенийGoSMSAuthError- ошибка аутентификацииGoSMSRequestError- ошибка при выполнении запросаGoSMSValidationError- ошибка валидации данных
Требования
- Python 3.7+
- requests>=2.25.0
Лицензия
MIT
Документация
Полная документация API доступна на сайте: https://docs.gosms.ru/
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 gosms_ru_client-0.1.6.tar.gz.
File metadata
- Download URL: gosms_ru_client-0.1.6.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3834392a536ad12bb038bccfecc3599bd07c3f89a76024e98ef19ec720c3c75b
|
|
| MD5 |
ea5e00c571543cf4652081dd3683aeba
|
|
| BLAKE2b-256 |
18996766a4491b1e67bd752947a07eb875cbda127722fc91f524ec92a4ee5b0e
|
File details
Details for the file gosms_ru_client-0.1.6-py3-none-any.whl.
File metadata
- Download URL: gosms_ru_client-0.1.6-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fc1ab2d947810984cd4bfd7b1b9dcde785d2c62c3ed2aa2ce1bf8985abeced2c
|
|
| MD5 |
a00a11aa5a669a333e5260d9f216d9f4
|
|
| BLAKE2b-256 |
2b2698152ac38834e65b0639525542cecef6019b4f626bab5f2f92d395277729
|