Async-Notify
Async-Notify is a simple, asyncio-based notification library for Apps.
Notify is built on top of python asyncio for send notifications asynchronous with support of twilio, telegram, o365, email, slack, onesignal and many others.
Why Async-Notify?
The finality of Async-Notify is to provide us a subset of communication providers for sending different notifications in a non-blocking mode.. The main goal of Async-Notify is using only asyncio-based technologies.
Requirements
- Python >= 3.8
- asyncio (https://pypi.python.org/pypi/asyncio/)
Quick Tutorial
Currently Async-Notify supports the following providers:
- Amazon SES
- Email (SMTP)
- Gmail
- Office 365
- Telegram (requires aiogram)
- Twilio (SMS)
- OneSignal
- XMPP stanzas
Templates
send(template=...) accepts either a template filename (resolved on
TEMPLATE_DIR, unchanged since earlier versions) or raw Jinja2 source
text, auto-detected by a conservative heuristic (a Jinja2 delimiter
{{, {%, {#, or a line break means source; anything else is treated as
a filename). Use template_is_source=True/False to force either
interpretation when the heuristic can't decide (for example a body with no
Jinja markup and no newline, which is indistinguishable from a filename).
# raw source — new in 1.6.0
await Notify("smtp").send(
recipient=[actor],
subject="Welcome",
template="<p>Hola {{ recipient.account.address }} — {{ message }}</p>",
message="…",
)
# filename — unchanged behaviour
await Notify("smtp").send(recipient=[actor], template="welcome.html")
# forced, for a body with no Jinja markup
await Notify("telegram").send(
recipient=[chat], template="Hello world", template_is_source=True,
)
Security note: autoescape is disabled, so a template compiled from a
string executes arbitrary Jinja2 and emits unescaped output. Template
source must come from trusted operators (configuration, database rows
written by staff) — never from end-user input. End-user data belongs in the
message parameters, not in the template body itself.
Future work:
- Slack
- Facebook Messenger
- Discord
- IRC
How do I get set up?
- Summary of set up
- Configuration
- Dependencies
- Database configuration
- How to run tests
- Deployment instructions
Contribution guidelines
Please have a look at the Contribution Guide
- Writing tests
- Code review
Who do I talk to?
- Repo owner or admin
- Other community or team contact
License
Async-Notify is copyright of Jesus Lara (https://phenobarbital.info) and is licensed under BSD license. I am providing code in this repository under an open source licenses, remember, this is my personal repository; the license that you receive is from me and not from my employeer.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file async_notify-1.6.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: async_notify-1.6.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 666.5 kB
- Tags: CPython 3.14, manylinux: glibc 2.17+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c3856e329c65e157d7eab7b539ccd04a21e70ecf0fe90bad2bcc1feb46b96127
|
|
| MD5 |
cf103e8c0774618683a4adf0271dcec1
|
|
| BLAKE2b-256 |
8359d696b1489b4716be643b6689792c1498bc0312753ffd713025f20f141c56
|
File details
Details for the file async_notify-1.6.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: async_notify-1.6.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 672.4 kB
- Tags: CPython 3.13, manylinux: glibc 2.17+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d24b03b21569b3c07e2049547c8fa342c028aacd4922b5f6359684dcc3aa1f5a
|
|
| MD5 |
0b1182a29836ef61cbbfac51dec6e0d4
|
|
| BLAKE2b-256 |
220980b58f4357f9e574277036866e4a93ec8f50eb55e4f0568d396bf1c1f434
|
File details
Details for the file async_notify-1.6.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: async_notify-1.6.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 671.8 kB
- Tags: CPython 3.12, manylinux: glibc 2.17+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ff049112fab3d07360faba530e0dd4c17de7643931b0b00db6393a26a6e29775
|
|
| MD5 |
e6c9aa270829334607f3751ca5dd02b3
|
|
| BLAKE2b-256 |
807779223ef883fc539024f5066c26cdf97a19a8576d6fb395b4dc093d83fc85
|
File details
Details for the file async_notify-1.6.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: async_notify-1.6.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 624.6 kB
- Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
62b1db250f1ab9314c104cc06ed2c6f86e955f6a1943ecb98210afa3bb827349
|
|
| MD5 |
bc2ea2b8ef776609d3ad2276c8377eb0
|
|
| BLAKE2b-256 |
22346c8449870481b04b54743cb7b87fcc8dc23f96fba497b8f70137f578dfeb
|