Skip to content

🐍 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.

License

Notifications You must be signed in to change notification settings

715kg/python-sdk

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

24 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

PyPI version Python versions Downloads License

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/

About

🐍 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.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%