Skip to main content

Python SDK for sending SMS messages through the 4jawaly SMS Gateway

Project description

SMS4Jawaly Python SDK

🇬🇧 English

Python library for sending SMS messages through the 4jawaly SMS Gateway with support for parallel sending and batch processing.

Features

  • Parallel SMS sending with automatic batch processing
  • Support for large number of recipients (automatically split into chunks)
  • Comprehensive error handling and reporting
  • Balance checking and sender names management

Installation

pip install sms4jawaly-py

Usage

from sms4jawaly_py import SMS4JawalyClient

# Initialize client
client = SMS4JawalyClient(
    api_key='your_api_key',
    api_secret='your_api_secret',
    sender='YOUR_SENDER_NAME'
)

# Send to multiple numbers (automatically handled in parallel)
numbers = ['966500000000', '966500000001']
result = client.send_sms(
    message='Test message from 4jawaly!',
    numbers=numbers
)

# Check results
print(f'Success: {result["total_success"]} messages')
print(f'Failed: {result["total_failed"]} messages')
if result["job_ids"]:
    print(f'Job IDs: {result["job_ids"]}')
if result["errors"]:
    print(f'Errors: {result["errors"]}')

# Check balance
balance = client.get_balance()
print(f'Current balance: {balance}')

# Get sender names
senders = client.get_senders()
print(f'Approved senders: {senders}')

🇸🇦 عربي

مكتبة Python لإرسال الرسائل النصية القصيرة عبر بوابة 4jawaly للرسائل مع دعم الإرسال المتوازي ومعالجة الدفعات.

المميزات

  • إرسال الرسائل بشكل متوازٍ مع معالجة تلقائية للدفعات
  • دعم لعدد كبير من المستلمين (تقسيم تلقائي إلى مجموعات)
  • معالجة شاملة للأخطاء وإعداد التقارير
  • التحقق من الرصيد وإدارة أسماء المرسلين

التثبيت

pip install sms4jawaly-py

الاستخدام

from sms4jawaly_py import SMS4JawalyClient

# تهيئة العميل
client = SMS4JawalyClient(
    api_key='your_api_key',
    api_secret='your_api_secret',
    sender='YOUR_SENDER_NAME'
)

# إرسال لعدة أرقام (معالجة متوازية تلقائياً)
numbers = ['966500000000', '966500000001']
result = client.send_sms(
    message='رسالة تجريبية من 4jawaly!',
    numbers=numbers
)

# التحقق من النتائج
print(f'نجاح: {result["total_success"]} رسالة')
print(f'فشل: {result["total_failed"]} رسالة')
if result["job_ids"]:
    print(f'معرفات المهام: {result["job_ids"]}')
if result["errors"]:
    print(f'الأخطاء: {result["errors"]}')

🇫🇷 Français

Bibliothèque Python pour l'envoi de SMS via la passerelle 4jawaly avec support pour l'envoi parallèle et le traitement par lots.

Caractéristiques

  • Envoi parallèle de SMS avec traitement automatique par lots
  • Support pour un grand nombre de destinataires (division automatique en lots)
  • Gestion complète des erreurs et rapports
  • Vérification du solde et gestion des noms d'expéditeur

Installation

pip install sms4jawaly-py

Utilisation

from sms4jawaly_py import SMS4JawalyClient

# Initialiser le client
client = SMS4JawalyClient(
    api_key='your_api_key',
    api_secret='your_api_secret',
    sender='YOUR_SENDER_NAME'
)

# Envoi à plusieurs numéros (traitement parallèle automatique)
numbers = ['966500000000', '966500000001']
result = client.send_sms(
    message='Message test de 4jawaly!',
    numbers=numbers
)

# Vérifier les résultats
print(f'Succès: {result["total_success"]} messages')
print(f'Échec: {result["total_failed"]} messages')

🇵🇰 اردو

4jawaly SMS گیٹ وے کے ذریعے SMS پیغامات بھیجنے کے لیے پائتھن لائبریری، متوازی بھیجنے اور بیچ پروسیسنگ کی سہولت کے ساتھ۔

خصوصیات

  • خودکار بیچ پروسیسنگ کے ساتھ متوازی SMS بھیجنا
  • بڑی تعداد میں وصول کنندگان کی سہولت (خودکار طور پر حصوں میں تقسیم)
  • جامع غلطی کی نشاندہی اور رپورٹنگ
  • بیلنس چیکنگ اور بھیجنے والے ناموں کا انتظام

انسٹالیشن

pip install sms4jawaly-py

استعمال

from sms4jawaly_py import SMS4JawalyClient

# کلائنٹ کو شروع کریں
client = SMS4JawalyClient(
    api_key='your_api_key',
    api_secret='your_api_secret',
    sender='YOUR_SENDER_NAME'
)

# متعدد نمبروں پر بھیجیں (خودکار متوازی پروسیسنگ)
numbers = ['966500000000', '966500000001']
result = client.send_sms(
    message='4jawaly سے ٹیسٹ پیغام!',
    numbers=numbers
)

# نتائج چیک کریں
print(f'کامیاب: {result["total_success"]} پیغامات')
print(f'ناکام: {result["total_failed"]} پیغامات')

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sms4jawaly_py-1.0.2.tar.gz (9.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sms4jawaly_py-1.0.2-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

Details for the file sms4jawaly_py-1.0.2.tar.gz.

File metadata

  • Download URL: sms4jawaly_py-1.0.2.tar.gz
  • Upload date:
  • Size: 9.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.0

File hashes

Hashes for sms4jawaly_py-1.0.2.tar.gz
Algorithm Hash digest
SHA256 352abbdc371f5d1496984b1bbff1a4d3a6f149595feb721584efdf0c8c36af1c
MD5 902e81f5bdf6a238273aeb5eba23a7df
BLAKE2b-256 39db8a4b49ffe5b8822651a4f2ef2bc78c84a91ffcac6e3ed0e02401fa992062

See more details on using hashes here.

File details

Details for the file sms4jawaly_py-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: sms4jawaly_py-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 7.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.0

File hashes

Hashes for sms4jawaly_py-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4d8cdc06f0827b411ecc4d2a5a0afbab1f8ba9fa5fb8bda7e49e1f964ed850ca
MD5 785f4290d7c789f016b01373a7da1e7a
BLAKE2b-256 8eef0d4a313910c0b4b7e818c7955fa35528dcb377341f583a4e6b871238c9a8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page