Skip to main content

A Python application for powering other python applications to send SMS messages globally with number validation and restrictions by Tarmica Chiwara

Project description

Chromastone SMS App

Chromastone is a Python application designed to simplify the process of sending SMS messages. Utilizing a straightforward API, Chromastone ensures that destination numbers are validated and messages are efficiently delivered while adhering to specified constraints.

Features

  • Validation of destination numbers to ensure they are in international format without the '+' prefix.
  • Enforcement of message length to not exceed 100 characters.
  • Easy integration with existing Python applications.

Installation

To use Chromastone, you need to install the required dependencies first. It is recommended to use a virtual environment:

python -m venv venv
source venv/bin/activate  # On Windows use `venv\Scripts\activate`

After activating the virtual environment, install the dependencies:

pip install requests pydantic

Configuration

Before you can start sending SMS messages, ensure you have an API key from the SMS service provider. You will need to replace 'your_api_key_here' in the code with your actual API key.

Usage

To send an SMS using Chromastone, instantiate the Chromastone class with your API key and call the send_sms method with the source number, destination number, and message:

from chromastone import Chromastone

chromastone = Chromastone(api_key='your_api_key_here')
chromastone.send_sms(source_number='1234567890', destination_number='263771123456', message='Hello, world!')

Ensure the destination number is in the correct format and the message does not exceed 100 characters.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contributions

Contributions are welcome! Please feel free to submit a pull request or open an issue for any bugs or feature requests.

Acknowledgments

  • Thanks to the Pydantic library for providing robust data validation.
  • Gratitude to the Requests library for simplifying HTTP requests in Python.

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

chromastone-0.2.1.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

chromastone-0.2.1-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

Details for the file chromastone-0.2.1.tar.gz.

File metadata

  • Download URL: chromastone-0.2.1.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.6

File hashes

Hashes for chromastone-0.2.1.tar.gz
Algorithm Hash digest
SHA256 25a6361f63737e5b2238d35f1cb9362b5a3f0d03e17ac3f07603d62bc0695558
MD5 e1709e77fe51f3c97e9d5272d5f7e85f
BLAKE2b-256 6d48ec255b11d2da07e36e0b1647599917681d56ddfaee4a1125d467f6359378

See more details on using hashes here.

File details

Details for the file chromastone-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: chromastone-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 5.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.6

File hashes

Hashes for chromastone-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9fcc40378b0f7393a2ee081492c2350e648874630dfeb7c7a0cdfe5d11673b2e
MD5 6528c7337cc29e039a77e54a443bbc2a
BLAKE2b-256 73de5f4a76dedebc8086fc5a76462babced87c0cf8a78a5a21cd93af727e2822

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