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/
Release files for gosms-ru-client 0.1.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| gosms_ru_client-0.1.6.tar.gz | 3.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| gosms_ru_client-0.1.6-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.8 kB
Release files / gosms_ru_client-0.1.6.tar.gz
| Download URL | gosms_ru_client-0.1.6.tar.gz |
|---|---|
| Size | 3.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3834392a536ad12bb038bccfecc3599bd07c3f89a76024e98ef19ec720c3c75b
|
|
BLAKE2b-256 checksum How to use checksums |
18996766a4491b1e67bd752947a07eb875cbda127722fc91f524ec92a4ee5b0e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.2
|
Release files / gosms_ru_client-0.1.6-py3-none-any.whl
| Download URL | gosms_ru_client-0.1.6-py3-none-any.whl |
|---|---|
| Size | 4.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fc1ab2d947810984cd4bfd7b1b9dcde785d2c62c3ed2aa2ce1bf8985abeced2c
|
|
BLAKE2b-256 checksum How to use checksums |
2b2698152ac38834e65b0639525542cecef6019b4f626bab5f2f92d395277729
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.2
|