Skip to main content

BlackSMS Python SDK (blacksms)

Official Python client library for the BlackSMS API Platform.

Easily send SMS OTPs, WhatsApp OTPs, Quick SMS, and manage Bulk SMS Campaigns in Python, Django, FastAPI, and Flask.


Installation

pip install blacksms

Quick Start

from blacksms import BlackSMS, BlackSMSAPIError

# Initialize client with your API key
client = BlackSMS(api_key="YOUR_BLACKSMS_API_KEY")

# 1. Send SMS OTP
try:
    response = client.send_sms(
        sender_id=1,          # Your numeric Sender ID (e.g. 1, 2, 10)
        code="123456",        # OTP code
        numbers="9876543210", # Recipient number
        route=1
    )
    print("SMS OTP Sent:", response)
except BlackSMSAPIError as e:
    print("API Error:", e)

# 2. Send WhatsApp OTP
response = client.send_whatsapp(
    sender_id=1,
    code="123456",
    numbers="9876543210"
)

# 3. Send Quick SMS
response = client.send_quick_sms(
    sender_id=1,
    message="Welcome to BlackSMS!",
    numbers="9876543210"
)

# 4. Create Bulk SMS Campaign
campaign = client.create_bulk_sms_campaign(
    title="Promo Sale",
    message="Check out our special offers!",
    contacts=["9876543210", "9123456789"]
)
print("Campaign Created:", campaign)

Metadata

Release files for blacksms 1.0.0

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

Source distribution (sdist)

Source distribution for blacksms 1.0.0
File Size Uploaded Provenance Actions
blacksms-1.0.0.tar.gz 3.2 kB Without provenance Details for blacksms-1.0.0.tar.gz

Built distribution (wheel)

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

Total release size: 6.5 kB

Release files / blacksms-1.0.0.tar.gz

Download URL blacksms-1.0.0.tar.gz
Size 3.2 kB
Tags Source
SHA-256 checksum
How to use checksums
0add56f28eae2412167ec580bd1779f987f1ff9c988e9b2d728f37af0dc6091c
BLAKE2b-256 checksum
How to use checksums
8b5e51ad78ab6901b629c79557b1bd895084faad5745998491dfe04aeae52d2c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.15

Release files / blacksms-1.0.0-py3-none-any.whl

Download URL blacksms-1.0.0-py3-none-any.whl
Size 3.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9ed03f171b1ec2b064daea8974457aafc6fca823af7e97e78948548513c4ee95
BLAKE2b-256 checksum
How to use checksums
2324a88088bd0ca60c900b441edb99f465cf8d44b783dd5a3f09d9c9be419a6b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.15

Security for blacksms 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No provenance

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