Skip to main content

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

✅ Telegram

✅ SMTP

🔴 local

🔴 Signal

🔴 RSS

🔴 SMS

🔴 Discord bot

🔴 message_senders API (futur project)

License

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

Metadata

Release files for messages-sender 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for messages-sender 0.1.3
File Size Uploaded Provenance Actions
messages_sender-0.1.3.tar.gz 4.3 kB Without provenance Details for messages_sender-0.1.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for messages-sender 0.1.3
File Interpreter ABI Platform Actions
messages_sender-0.1.3-py3-none-any.whl Python 3 none any Details for messages_sender-0.1.3-py3-none-any.whl

Total release size: 9.3 kB

Release files / messages_sender-0.1.3.tar.gz

Download URL messages_sender-0.1.3.tar.gz
Size 4.3 kB
Tags Source
SHA-256 checksum
How to use checksums
279186a486f7d857ec791801acf3f98fbe049a83af2517cca657d6eca3fb3042
BLAKE2b-256 checksum
How to use checksums
dfb77d4009dcf5becade06aad583b9abc1d30c21b1d47dc4d6fdd6f1ba99a10a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.13 CPython/3.10.2 Linux/5.16.14-200.fc35.x86_64

Release files / messages_sender-0.1.3-py3-none-any.whl

Download URL messages_sender-0.1.3-py3-none-any.whl
Size 5.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b7763dc903e852b1558a294bf0e9ec9b061810d0da264e4a9a76024df1274bfa
BLAKE2b-256 checksum
How to use checksums
0ce6cfea8c9f2d11206b1c8daa590f8ef677ed5f6dbeff64e7b66cc694fa9cf3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.13 CPython/3.10.2 Linux/5.16.14-200.fc35.x86_64

Security for messages-sender 0.1.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page