Skip to main content

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

Project description

SMS4Jawaly Python SDK

🇸🇦 عربي

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

المتطلبات

  • Python 3.6 أو أحدث
  • pip

التثبيت

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

# إرسال رسالة لرقم واحد
response = client.send_single_sms('966500000000', 'مرحباً من 4jawaly!')
print(f'تم إرسال الرسالة بنجاح: {response.success}')

# إرسال رسالة لعدة أرقام
numbers = ['966500000000', '966500000001']
response = client.send_sms(numbers, 'رسالة جماعية من 4jawaly!')
print(f'تم إرسال: {response.total_success}')

🇬🇧 English

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

Requirements

  • Python 3.6 or later
  • pip

Installation

pip install sms4jawaly-py

Usage

from sms4jawaly_py import SMS4JawalyClient

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

# Send message to a single number
response = client.send_single_sms('966500000000', 'Hello from 4jawaly!')
print(f'Message sent successfully: {response.success}')

# Send message to multiple numbers
numbers = ['966500000000', '966500000001']
response = client.send_sms(numbers, 'Bulk message from 4jawaly!')
print(f'Sent: {response.total_success}')

🇫🇷 Français

Bibliothèque Python pour l'envoi de SMS via la passerelle SMS 4jawaly

Prérequis

  • Python 3.6 ou plus récent
  • pip

Installation

pip install sms4jawaly-py

Utilisation

from sms4jawaly_py import SMS4JawalyClient

# Créer une instance du client
client = SMS4JawalyClient(
    api_key='your_api_key',
    api_secret='your_api_secret',
    sender='YOUR_SENDER_NAME'
)

# Envoyer un message à un seul numéro
response = client.send_single_sms('966500000000', 'Bonjour de 4jawaly!')
print(f'Message envoyé avec succès: {response.success}')

# Envoyer un message à plusieurs numéros
numbers = ['966500000000', '966500000001']
response = client.send_sms(numbers, 'Message groupé de 4jawaly!')
print(f'Envoyé: {response.total_success}')

🇵🇰 اردو

4jawaly SMS گیٹ وے کے ذریعے SMS پیغامات بھیجنے کے لیے Python لائبریری

ضروریات

  • Python 3.6 یا اس سے نئی ورژن
  • pip

انسٹالیشن

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

# ایک نمبر پر پیغام بھیجیں
response = client.send_single_sms('966500000000', '4jawaly سے سلام!')
print(f'پیغام کامیابی سے بھیج دیا گیا: {response.success}')

# متعدد نمبروں پر پیغام بھیجیں
numbers = ['966500000000', '966500000001']
response = client.send_sms(numbers, '4jawaly سے اجتماعی پیغام!')
print(f'بھیجے گئے: {response.total_success}')

📚 API Documentation / التوثيق / Documentation / دستاویزات

SMS4JawalyClient

class SMS4JawalyClient:
    def __init__(self, api_key: str, api_secret: str, sender: str):
        """
        Initialize the client
        تهيئة العميل
        Initialiser le client
        کلائنٹ کو شروع کریں
        """
        pass
    
    def send_single_sms(self, number: str, message: str) -> SMSResponse:
        """
        Send to single number
        إرسال لرقم واحد
        Envoyer à un seul numéro
        ایک نمبر پر بھیجیں
        """
        pass
    
    def send_sms(self, numbers: List[str], message: str) -> SMSResponse:
        """
        Send to multiple numbers
        إرسال لعدة أرقام
        Envoyer à plusieurs numéros
        متعدد نمبروں پر بھیجیں
        """
        pass
    
    def get_balance(self, is_active: Optional[int] = None) -> BalanceResponse:
        """
        Check balance
        فحص الرصيد
        Vérifier le solde
        بیلنس چیک کریں
        """
        pass

class SMSResponse:
    success: bool
    total_success: int
    total_failed: int
    job_ids: List[str]
    errors: Optional[Dict[str, List[str]]]

class BalanceResponse:
    balance: float
    packages: Optional[List[Package]]

📝 License / الترخيص / Licence / لائسنس

MIT License / رخصة MIT / Licence MIT / MIT لائسنس

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.0.tar.gz (8.2 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.0-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sms4jawaly_py-1.0.0.tar.gz
  • Upload date:
  • Size: 8.2 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.0.tar.gz
Algorithm Hash digest
SHA256 a5f2bc523e7ec28e6a6a7846edfec173e10a6a9f418502688d53ed26ad8290f0
MD5 ed858912f235619bc962c9bbdf55c9ac
BLAKE2b-256 8846c6753b8fbe92b6dba113837d2f256ecdc409e6203dc15b621bb0d21bb025

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sms4jawaly_py-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 6.5 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f8cfefec13c8b022062641c83c7944449084f7ffbf2e614414d9fa90de364457
MD5 d7b9f84f34ebc7d5d71d361b9bf5bdd7
BLAKE2b-256 99943150f2547aee11f223e69c57924ef0237457eb6113a2feadf9987c8924e2

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