Skip to main content

badge_pipeline badge_coverage badge_release badge_pyver badge_license

🚩 Table of contents

  1. 👀 What is bulksms?

  2. 📌 Requirements

  3. 🚀 Quick start

  4. 💙 Help us be better

  5. 🎖️ License

👀 What is bulksms?

bulksms is the simplest way to text people (send SMS) via python:

import bulksms

bsms = bulksms.BulkSMS(token_id='17A7C58921F54B5899D5C1237FCCD5FA-02-F', token_secret='9Sj8Ae9WQhBMEI2eMGXIKpZHC8shq')

bsms.send('+123456789', 'Hello world! 👋🏻')

bulksms uses BulkSMS.com to deliver SMS.

Features

This library allows you to:

  • Send SMS to one recipient

  • Bulk-send an SMS to many recipients at once

  • Look up the delivery cost of a previous message

  • Look up the delivery status of a previous message

  • Customize the delivery type to trade time with cost

  • Customize the sender ID e.g. to your mobile number or a company name

  • Send “long SMS” exceeding the single-message length, using SMS concatenation

  • Send messages with plain text (160 characters/message) or Unicode, e.g. emojis (67 characters/message)

📌 Requirements

  • Python version between 3.9 and 3.12

  • An account at BulkSMS.com with some delivery credits

  • If you want to use custom sender IDs (e.g. your company name or your own mobile number), you need to have them configured in your BulkSMS account.

  • You need internet connectivity and HTTPS open towards api.bulksms.com to reach the delivery API

🚀 Quick start

Install the bulksms library into it:

pip install bulksms

Write some code to deliver messages:

import bulksms

# authenticate to BulkSMS with token data (log into BulkSMS > Settings > Advanced > API Tokens)
bsms = bulksms.BulkSMS(token_id='17A7C58921F54B5899D5C1237FCCD5FA-02-F', token_secret='9Sj8Ae9WQhBMEI2eMGXIKpZHC8shq')
bsms.send('+123456789', 'Hello world! 👋🏻')

Done!

Here’s some more advanced use-cases to deliver SMS:

import bulksms

bsms = bulksms.BulkSMS(token_id='17A7C58921F54B5899D5C1237FCCD5FA-02-F', token_secret='9Sj8Ae9WQhBMEI2eMGXIKpZHC8shq')

# send a message with a custom mobile number as Sender
bsms.send('+123456789', 'Hello world! 👋🏻', sender='+1666777888')
# send a message with a custom brand as SenderID
bsms.send('+123456789', 'Hello world! 👋🏻', sender='Google inc')

# send a text to a bunch of receivers in bulk
bsms.send(['+123456789', '+4985296345', '+44785612458'], 'Hello world! 👋🏻')

# send a text message with top priority.
# Unless priority is requested, the default 'routingGroup' set in the BulkSMS account is used.
bsms.send('+123456789', 'Hello world! 👋🏻', priority=True)

And here’s some inspection use-cases:

import bulksms

bsms = bulksms.BulkSMS(token_id='17A7C58921F54B5899D5C1237FCCD5FA-02-F', token_secret='9Sj8Ae9WQhBMEI2eMGXIKpZHC8shq')

# look up what's the current delivery status of a message
msgid = bsms.send('+123456789', 'Hello world! 👋🏻')

dstatus = bsms.msg_delivery_status(msgid)
# dstatus is in {'ACCEPTED', 'SCHEDULED', 'SENT', 'DELIVERED', 'FAILED'}

dcost = bsms.msg_cost(msgid)
# dcost is a float showing the number of credits consumed to deliver the message

💙 Help us be better

Here’s how you can help:

  • ⭐️ star our repository if you like bulksms.

  • Mention bulksms in any of your online posts so people find out about it.

And if you’re a developer:

  • Report any issue in our code or docs. We take those seriously.

  • Package bulksms for your distribution. Else Ubuntu, Debian, CentOS and FreeBSD will serve the most people.

🎖️ License

bulksms is open-source software (BSD 3-clause license).

Metadata

Release files for bulksms 1.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bulksms 1.1.1
File Size Uploaded
bulksms-1.1.1.tar.gz 11.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for bulksms 1.1.1
File Interpreter ABI Platform
bulksms-1.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 23.4 kB

Release files / bulksms-1.1.1.tar.gz

Download URL bulksms-1.1.1.tar.gz
Size 11.9 kB
Tags Source
SHA-256 checksum
How to use checksums
48aaaada495c434ef43f840d83bce5b56a43fb3926ddb29824d244a5cd1fc523
BLAKE2b-256 checksum
How to use checksums
efe5dab38787f0c0615fd0700e961b5ad1be0be361543a63dcc91c8376a671a9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.12.4

Release files / bulksms-1.1.1-py3-none-any.whl

Download URL bulksms-1.1.1-py3-none-any.whl
Size 11.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c8110db6ea001f6fffa296003407d5c72e26c5a09ac3da238d031eac0f9d5579
BLAKE2b-256 checksum
How to use checksums
d6b084eafdc5327188cfa1b2b7a975027656cfc85ce21c8a3fe3a7d9bf63f39a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.12.4

Release history Release notifications | RSS feed

This release

1.1.1 This release

2 release files

1.1.0

2 release files

1.0.0

2 release files

0.3

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page