Skip to main content

Easy and efficient messaging.

Project description

Messages: Create and send messages fast!

PyPI version Coverage Status

messages_words

Purpose

  • Messages is a package designed to make sending messages easy and efficient!
  • Messages intends to be a lightweight package with minimal dependencies.
  • Messages with a consistent API across all message types.
  • Messages includes asynchronous support for fast message handling.

Installation

Python3 only

$ pip install messages

Documentation in the Wiki

Supported Messages

Examples

Synchronous Execution

# You can send messages right in the REPL

>>> from messages import Email
>>> 
>>> m = Email(
            from_ = "me@here.com",
            to = "you@there.com",
            auth = "p@ssw0rd",   
            subject: "Good Advice"
            body = "Hello,\n\tBuy more Bitcoin!",
            attachments = ["./file1.txt", "~/Documents/file2.pdf"],
   )
>>>
>>> m.send()        
Message sent...

Asynchronous Execution

# You can also send messages inside a script

import asyncio

from messages import Email

RECIPIENTS = [
    "you@mail.com",
    "him@mail.com",
    "her@mail.com",
    "doglover@mail.com",
]



loop = asyncio.get_event_loop()

for r in RECIPIENTS
    e = Email(
        from_ = "me@gmail.com",
        to = r,
        auth = "p@ssw0rd",
        subject = "Good Advice",
        body = "This is an asynchronous email.\nContinue buying more Bitcoin!",
        attachments = ["./file1.txt", "~/Documents/file2.pdf"],
    )
    
loop.create_task(e.send_async())
tasks = asyncio.all_tasks(loop=loop)
group = asyncio.gather(*tasks)
loop.run_until_complete(group)

Read the Wiki for more examples

Contributing Code

  • Help Wanted!
  • All contributions are welcome to build upon the package!
  • If it's a message, add it to messages!
  • Read the Wiki for guidelines.

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.8.0.tar.gz (14.4 kB view details)

Uploaded Source

Built Distribution

messages-0.8.0-py3-none-any.whl (18.5 kB view details)

Uploaded Python 3

File details

Details for the file messages-0.8.0.tar.gz.

File metadata

  • Download URL: messages-0.8.0.tar.gz
  • Upload date:
  • Size: 14.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.8 CPython/3.7.10 Linux/4.4.0-92-generic

File hashes

Hashes for messages-0.8.0.tar.gz
Algorithm Hash digest
SHA256 5290463f41e0ff053078de8ec6d13aba4068081cccfd4460005485ff849512c9
MD5 2c4a4578942a76bee0113ed09544566d
BLAKE2b-256 ba6d6f05773d8d99638cfa2634a1408b416677ae5e95821718b2919566e6ddd1

See more details on using hashes here.

File details

Details for the file messages-0.8.0-py3-none-any.whl.

File metadata

  • Download URL: messages-0.8.0-py3-none-any.whl
  • Upload date:
  • Size: 18.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.8 CPython/3.7.10 Linux/4.4.0-92-generic

File hashes

Hashes for messages-0.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9fa421cff0c2031b1cc80f4ce06b67720fa288e54ae694365a4425a57b9dfe86
MD5 1a313b64d3489974624dc5c490620bf2
BLAKE2b-256 904412baea3ec30d2de74c596b1051ba8c9b8928567f7bed89db6a989fd0656f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page