Skip to main content

Message sender is a library which create a message to send from a python dictionnary and a Jinja template and send it by the method of your choice.

Project description

Messages Sender

License: MIT Code style: black

Format and send a message following a template.

Description

Message sender is a library which create a message to send from a python dictionnary and a Jinja template and send it by [the method of your choice](##Send methods available).

pipeline

Getting Started

Dependencies

  • python3.8+

Installing

pip install messages-sender

Use it

example:

from messages-sender import MessageSender
credentials = {
    "SMTP": {
        "port": 465,
        "password": "your_mail_password",
        "sender_email": "your_mail",
    },
}
method = "smtp"
template = "templates/mail_template.jinja"
message = {
    "subject": "Test",
    "core": "The results of your analyse are available.",
    "results": {"link": "https://github.com/Ermite28/messages_sender", "label": "See the result"},
    "greetings": "Best regards,\nBenoît de Witte",
    "senders": {"info": "Ermite28, Belgium"},
}
MessageSender(credentials=credentials, method=method, template=template).send_message("your_email", message=message)

TODO

  • Maybe rethink about the library interface?
  • Make more example template
  • Handle mails attached files.
  • Better error handling.
  • Add unit test
  • should it handle file (config, template, message)? NO

Send methods available

:white_check_mark: Telegram

:white_check_mark: SMTP

:red_circle: local

:red_circle: Signal

:red_circle: RSS

:red_circle: SMS

:red_circle: Discord bot

:red_circle: message_senders API (futur project)

License

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

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_sender-0.1.3.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

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

messages_sender-0.1.3-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file messages_sender-0.1.3.tar.gz.

File metadata

  • Download URL: messages_sender-0.1.3.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.10.2 Linux/5.16.14-200.fc35.x86_64

File hashes

Hashes for messages_sender-0.1.3.tar.gz
Algorithm Hash digest
SHA256 279186a486f7d857ec791801acf3f98fbe049a83af2517cca657d6eca3fb3042
MD5 110a5f239f8642b3cf567e6205930a18
BLAKE2b-256 dfb77d4009dcf5becade06aad583b9abc1d30c21b1d47dc4d6fdd6f1ba99a10a

See more details on using hashes here.

File details

Details for the file messages_sender-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: messages_sender-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 5.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.10.2 Linux/5.16.14-200.fc35.x86_64

File hashes

Hashes for messages_sender-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 b7763dc903e852b1558a294bf0e9ec9b061810d0da264e4a9a76024df1274bfa
MD5 840a106f8d398b5c289cc502da215dd2
BLAKE2b-256 0ce6cfea8c9f2d11206b1c8daa590f8ef677ed5f6dbeff64e7b66cc694fa9cf3

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