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'
)

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

# 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'
)

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

# التحقق من النتائج
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'
)

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

# 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'
)

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

# نتائج چیک کریں
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.4.tar.gz (9.1 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.4-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sms4jawaly_py-1.0.4.tar.gz
  • Upload date:
  • Size: 9.1 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.4.tar.gz
Algorithm Hash digest
SHA256 623c8afc576ad834d20188bfe99b0485f9e9653d139e9b1c706311a4f067a602
MD5 d615be14bbe00e05a0fa3c20325da3cd
BLAKE2b-256 b59ecb47720c35333f01695994d2fde8561fc7946a56dfeeeb9aeda54bf7a147

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sms4jawaly_py-1.0.4-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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 3329940cfb7390aa8ae13032c9bd18cf8841bff2dce3dd437fd922bb560002a0
MD5 dacf1b8aaaec229ce9728a6d0c2870c7
BLAKE2b-256 d632f33637398bf5f50a60957ec74a99a0e7b588e99c7e1562f07b6c169b5bf5

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