Skip to main content

A package designed to make sending messages easy and efficient!

Project description

https://img.shields.io/badge/built%20with-Python3-red.svg https://travis-ci.org/trp07/messages.svg?branch=master https://coveralls.io/repos/github/trp07/messages/badge.svg?branch=master https://img.shields.io/badge/license-MIT-blue.svg https://messages-py.herokuapp.com/badge.svg

Join the conversation in the Messages Slack Team

Purpose

  • Messages is a package designed to make sending messages easy!

  • Messages incorporates various standard library module, third-party module, web app API calls, etc. all in one package.

  • Messages can send messages asynchronously.

Installation

$ pip install messages

Supported Messages

  • Email
    • SMTP

  • Text Messages (SMS/MMS)
    • Twilio API (must have API keys)

  • Slack
    • Inbound Webhook API

Upcoming Messages

  • WhatsApp

Examples

Email

>>> from messages import Email
>>> msg = 'Hello,\n\tTry this new package called "messages"!'
>>> m = Email(from_='me@here.com',
            to='you@there.com',
            body=msg,
            attachments=['./file1.txt', '~/Documents/file2.pdf']
        )
>>>
>>> m.send()        # send synchronously
>>> m.send_async()  # send asynchronously

Text Message

>>> from messages import Twilio
>>> msg = 'Hello,\n\tTry this new package called "messages"!'
>>> t = Twilio(from_='+16198675309',
            to='+16195551212',
            body=msg,
            acct_sid='your API sid',
            auth_token='your API token',
            attachments='https://imgs.xkcd.com/comics/python.png'
        )
>>>
>>> t.send()        # send synchronously
>>> t.send_async()  # send asynchronously

Slack - Inbound Webhook API

>>> from messages import SlackWebhook
>>> msg = 'Hello,\n\tTry this new package called "messages"!'
>>> s = SlackWebhook(url='webhook_url',
            body=msg,
            attachments='https://imgs.xkcd.com/comics/python.png'
        )
>>>
>>> s.send()        # send synchronously
>>> s.send_async()  # send asynchronously

Contributing

  • Help Wanted!

  • All contributions are welcome to build upon the package!

  • If it’s a message, add it to messages!

  • Please read CONTRIBUTING for guidelines, as well as a TODO List for ideas on where to get started.

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

messages-0.3.0.tar.gz (20.0 kB view hashes)

Uploaded Source

Built Distribution

messages-0.3.0-py3-none-any.whl (16.1 kB view hashes)

Uploaded Python 3

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