Skip to main content

A Python library for sending SMS messages via a custom gateway

Project description

pysmsgateway is a Python library that provides an interface for sending SMS messages 
via a gateway using the Traccar SMS Gateway Android application. It allows developers 
to send SMS messages programmatically from Python code to recipient mobile numbers, 
using a custom phone number as a reply number to the gateway.

### Features:
- Single SMS sending to a recipient.
- Bulk SMS sending to multiple recipients.
- Integration with systems requiring SMS functionality (e.g., 2FA).

### Important Notice:
- Download the Traccar Android Application from the playstore.
- For Local Connection, makesure you are on the same network with the Android phone which has traccar sms gateway application.
- Go to Settings, collect the IP Address of the phone and the api token.
- Use the token and the IP and indicated in the example.
- For more information on traccar sms gateway application to visit [Documentation](https://www.traccar.org/documentation/)
### Example Usage:
```python
from pysmsgateway import pysmsgateway

# Initialize the gateway
gateway = pysmsgateway(token='your_token', ip='your phone's ip', sms_token='your_sms_token')

# Sending a single message
gateway.send_sms('recipient_number', 'Hello, World!')

# Sending different messages to different recipients
data = {
    'recipient1': 'Message 1',
    'recipient2': 'Message 2',
    'recipient3': 'Message 3'
}
gateway.send_sms(data)

# Sending a single message to multiple recipients
numbers = ['recipient1', 'recipient2', 'recipient3']
gateway.send_sms('Single message to multiple recipients', numbers)
```
For more information visit [Github](https://github.com/ThomsonKaisi/pysmsgateway)

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

pysmsgateway-0.1.0.tar.gz (2.4 kB view details)

Uploaded Source

Built Distribution

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

pysmsgateway-0.1.0-py3-none-any.whl (2.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pysmsgateway-0.1.0.tar.gz
  • Upload date:
  • Size: 2.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.1

File hashes

Hashes for pysmsgateway-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e2a24106425e30fc487357ea81426db485ea3e0ceb31a283789cf7239d8969e0
MD5 ff7e2d891c3389b66194efbeba22ad6e
BLAKE2b-256 863807f232e4cff231ec8221303aa74b6e1d1a582ac673f6d483509973c6e9cd

See more details on using hashes here.

File details

Details for the file pysmsgateway-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pysmsgateway-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 2.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.1

File hashes

Hashes for pysmsgateway-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 80bc7488f06e52a9b3fbdc5321a96bee55a75e311bfddca3dd0736542c1e2f3d
MD5 99f74a381d67c7edc3d908a9ca6c3a9e
BLAKE2b-256 ae7e06f3bf428d91046302aa409ea2d68bd032ea002495844ebf34308dfb8d1c

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