Skip to main content

Add your description here

Project description

Multimodal Communication

multimodal_communication provides utilities for sending text messages through email-to-SMS gateways and managing files in Google Cloud Storage. This package is designed to simplify communication and data management across different platforms.

Features

  • SMS Messaging: Send text messages via email-to-SMS gateways (supports multiple carriers)
  • Asynchronous Support: Utilizes asyncio for non-blocking message sending
  • Batch Messaging: Send messages to multiple recipients simultaneously
  • Google Cloud Storage: Easy file upload, download, and deletion operations
  • Multiple Data Format Support: Work with CSV, JSON, and pickled objects

Components

SMS Messaging Module

This module allows you to send text messages through email-to-SMS gateways, supporting various carriers including Verizon, T-Mobile, Sprint, AT&T, and more.

from multimodal_communication.python_texting import send_text_message

# Send a simple text message
send_text_message(
    message="Hello from Python!",
    subject="Notification",
    phone_number="1234567890",
    carrier="tmobile",
    email="your-email@gmail.com",
    email_password="your-app-password"
)

CloudHelper

The CloudHelper class provides an interface for interacting with Google Cloud Storage:

from multimodal_communication.cloud_functions import CloudHelper

# Upload a local file to Google Cloud Storage
cloud = CloudHelper(path="path/to/local/file.csv")
cloud.upload_to_cloud(bucket_name="my-bucket", file_name="cloud-file.csv")

# Upload an object from memory
import pandas as pd
df = pd.DataFrame({"col1": [1, 2], "col2": [3, 4]})
cloud = CloudHelper(obj=df)
cloud.upload_to_cloud(bucket_name="my-bucket", file_name="dataframe.csv")

# Download a file from Google Cloud Storage
cloud = CloudHelper()
df = cloud.download_from_cloud("my-bucket/path/to/file.csv")

# Delete a file from Google Cloud Storage
cloud = CloudHelper()
cloud.delete_from_cloud(bucket_name="my-bucket", file_name="file-to-delete.csv")

Installation (with local project download)

pip install . -e

Requirements

  • Python 3.6+
  • pandas
  • google-cloud-storage
  • aiosmtplib

Setup

Google Cloud Authentication

To use the CloudHelper class:

  1. Set up Application Default Credentials (ADC) as described in the Google Cloud documentation
  2. Ensure your user account or service account has the required permissions (e.g., "storage.buckets.list")

Gmail Authentication for SMS

To use the SMS messaging functionality with Gmail:

  1. Create an App Password for your Google account (if you have 2FA enabled)
  2. Or enable "Less secure app access" (not recommended for production)

License

MIT License

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

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

multimodal_communication-0.4.1.tar.gz (77.0 kB view details)

Uploaded Source

Built Distribution

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

multimodal_communication-0.4.1-py3-none-any.whl (10.8 kB view details)

Uploaded Python 3

File details

Details for the file multimodal_communication-0.4.1.tar.gz.

File metadata

  • Download URL: multimodal_communication-0.4.1.tar.gz
  • Upload date:
  • Size: 77.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.10

File hashes

Hashes for multimodal_communication-0.4.1.tar.gz
Algorithm Hash digest
SHA256 bccae872cac0c3aaa8bff98b9139d2ee53cb76fbbc6e6fc1f7dfda421ff75c13
MD5 ba71aeed37d4b42df207c94ad1bb9b5d
BLAKE2b-256 d27819c7cf57a728ba25c50dd9e2d3a48b2a2b7254fe1398ee65ec85d7e8907c

See more details on using hashes here.

File details

Details for the file multimodal_communication-0.4.1-py3-none-any.whl.

File metadata

File hashes

Hashes for multimodal_communication-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 49b25cf667f90efac98ce0d7bcabd03f7662c1e09d3bd9cca047d80b55a909cf
MD5 1c6828e467d031c8d22257c26ac44132
BLAKE2b-256 d4e761b5ad3087972e80e00d6eada50e0f3e6ecfe31da58ea95049592d58d412

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