twilio-sendsms
A command-line tool for sending bulk SMS using Twilio.
The utility lets you define a mustache template and provide a CSV file with matching columns for bulk SMS sends.
Installation
The utility requires python3.7
python -m pip install twilio_sendsms
Setup
The first time you run, you will be prompted to provide your Twilio account details.
All configuration settings get stored in ~/.twilio-sendsms.config. To reconfigure you can delete this file.
Running
First, you need to define a mustache template and save to a file, e.g. example.mustache:
Hi {{first_name}}, this is a test SMS.
Next, you need to create a bulk send CSV file. The file must have a mobile_number column. The mobile number must be in the international format, e.g. +614XXXXXXXX. The other column names need to match the variable names used in the mustache template.
buld_send.csv
"mobile_number","first_name"
"+614XXXXXXXX","Joe"
To process the batch file:
sendsms --template example.mustache test.csv
Testing
Before processing a bulk CVS file, it's a good idea to sample some entries and send them to yourself first. Testing is useful to confirm the formatting and the number of segments are as expected.
To sample and override the mobile_number in the CSV file:
sendsms --template example.mustache --sample 1 --sendto +614XXXXXXXX test.csv
The command outputs destination mobile number, the Twilio message identifier and the SMS message sent.
+614XXXXXXXX,SM8c6335fdcffe4bb88313a16fabc9234d,Hi Joe, this is a test SMS.
Metadata
Release files for twilio-sendsms 0.1.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| twilio-sendsms-0.1.6.tar.gz | 3.5 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| twilio_sendsms-0.1.6-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.4 kB
Release files / twilio-sendsms-0.1.6.tar.gz
| Download URL | twilio-sendsms-0.1.6.tar.gz |
|---|---|
| Size | 3.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fb345ecf6557dabf40c65f59f24c3ebc2eff38497b1896661aa394e9cee765f0
|
|
BLAKE2b-256 checksum How to use checksums |
2e34527c6de9e9989fac99ecfa73dab89d38ce5209c108423d7a48af988d2404
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.5.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0
|
Release files / twilio_sendsms-0.1.6-py3-none-any.whl
| Download URL | twilio_sendsms-0.1.6-py3-none-any.whl |
|---|---|
| Size | 3.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
595b12cf7619e8de8a78092264ffffbfa3f3934076e457727131f0a729a32be8
|
|
BLAKE2b-256 checksum How to use checksums |
d11bc6b4ff977a4b37270389e8d1a6aa56169aac9290d2c195eb6b37b504991b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.5.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0
|
Security for twilio-sendsms 0.1.6
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.