Skip to main content

Асинхронный модуль для работы с Moonheim SMS API

Project description

MoonheimSMS

An asynchronous Python module for interacting with the Moonheim SMS API. The MoonheimSMS package allows for easy integration of SMS functionalities into your Python applications, including sending SMS messages, checking message status, and querying account balance.

Features

  • Asynchronous API calls
  • Send SMS messages
  • Check the status of sent messages
  • Retrieve account balance

Installation

pip install moonheimsms

Quick Start

First, ensure you have `aiohttp` installed:

pip install aiohttp

Then, you can start using `MoonheimSMS` by importing it in your project:

from moonheimsms import MoonheimSMS

Usage

Initialize the Client

moonheim = MoonheimSMS(token="YOUR_API_TOKEN", proxy="YOUR_PROXY")

Sending an SMS

await moonheim.sendSms(
    phone="RECIPIENT_PHONE_NUMBER",
    sender_name="YOUR_SENDER_NAME",
    text="Hello, World!",
    type_=0,
    gateway=0,
    short_link=1
)

Checking SMS Status

status = await moonheim.checkSmsStatus(message_id="YOUR_MESSAGE_ID")
print(status)

Retrieving Account Balance

balance = await moonheim.getBalance()
print(balance)

Handling Exceptions

`MoonheimSMS` raises `InvalidPhoneNumber` if an invalid phone number is provided. Ensure to handle this exception in your code to manage such errors gracefully.

Contributing

We welcome contributions! Please open an issue or submit a pull request for any improvements.

License

This project is licensed under the Apache License 2.0. See the LICENSE file for details.

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

moonheim_sms-0.1.0.tar.gz (7.8 kB view details)

Uploaded Source

File details

Details for the file moonheim_sms-0.1.0.tar.gz.

File metadata

  • Download URL: moonheim_sms-0.1.0.tar.gz
  • Upload date:
  • Size: 7.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for moonheim_sms-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4d4f5e63a4862907b583d410db0776c7984574d7d12bf519b0af5ca2edd89ab5
MD5 5f425bfdd2c0427c17d51f20f676eb9f
BLAKE2b-256 a6aff5f678ee6de4e333f94f0f48d95655441bbe5e5a1bf53826e870b87261b9

See more details on using hashes here.

Supported by

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