Skip to main content

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

Quick Tutorial

Currently Async-Notify supports the following providers:

  • Amazon SES
  • Email (SMTP)
  • Gmail
  • Office 365
  • Telegram (requires aiogram)
  • Twilio (SMS)
  • OneSignal
  • Twitter
  • 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

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

async_notify-1.6.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (666.5 kB view details)

Uploaded CPython 3.14manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

async_notify-1.6.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (672.4 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

async_notify-1.6.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (671.8 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

async_notify-1.6.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (624.6 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

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

File hashes

Hashes for async_notify-1.6.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c3856e329c65e157d7eab7b539ccd04a21e70ecf0fe90bad2bcc1feb46b96127
MD5 cf103e8c0774618683a4adf0271dcec1
BLAKE2b-256 8359d696b1489b4716be643b6689792c1498bc0312753ffd713025f20f141c56

See more details on using hashes here.

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

File hashes

Hashes for async_notify-1.6.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 d24b03b21569b3c07e2049547c8fa342c028aacd4922b5f6359684dcc3aa1f5a
MD5 0b1182a29836ef61cbbfac51dec6e0d4
BLAKE2b-256 220980b58f4357f9e574277036866e4a93ec8f50eb55e4f0568d396bf1c1f434

See more details on using hashes here.

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

File hashes

Hashes for async_notify-1.6.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 ff049112fab3d07360faba530e0dd4c17de7643931b0b00db6393a26a6e29775
MD5 e6c9aa270829334607f3751ca5dd02b3
BLAKE2b-256 807779223ef883fc539024f5066c26cdf97a19a8576d6fb395b4dc093d83fc85

See more details on using hashes here.

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

File hashes

Hashes for async_notify-1.6.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 62b1db250f1ab9314c104cc06ed2c6f86e955f6a1943ecb98210afa3bb827349
MD5 bc2ea2b8ef776609d3ad2276c8377eb0
BLAKE2b-256 22346c8449870481b04b54743cb7b87fcc8dc23f96fba497b8f70137f578dfeb

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.6.0 This release

4 files

1.5.7

4 files

1.5.5

3 files

1.5.4

3 files

1.5.3

3 files

1.5.2

3 files

1.5.1

3 files

1.5.0

3 files

1.4.2

4 files

1.4.1

4 files

1.4.0

4 files

1.3.10

4 files

1.3.9

4 files

1.3.8

4 files

1.3.7

4 files

1.3.6

4 files

1.3.5

4 files

1.3.4

4 files

1.3.3

4 files

1.3.2

4 files

1.3.1

4 files

1.3.0

4 files

1.2.4

4 files

1.2.3

3 files

1.2.2

3 files

1.2.1

3 files

1.2.0

3 files

1.1.5

3 files

1.1.4

3 files

1.1.3

3 files

1.1.2

3 files

1.1.1

3 files

1.1.0

3 files

1.0.1

3 files

1.0.0

3 files

0.9.4

1 file

0.9.3

1 file

0.9.2

1 file

0.9.1

2 files

0.9.0

2 files

0.8.13

2 files

0.8.12

2 files

0.8.11

2 files

0.8.10

2 files

0.8.9

2 files

0.8.8

2 files

0.8.7

2 files

0.8.6

2 files

0.8.5

2 files

0.8.4

2 files

0.8.3

2 files

0.8.2

2 files

0.8.1

2 files

0.8.0

2 files

0.7.0

2 files

0.6.4

2 files

0.6.3

2 files

0.6.2

2 files

0.6.1

2 files

0.6.0

2 files

0.5.27

2 files

0.5.26

2 files

0.5.25

2 files

0.5.24

2 files

0.5.23

2 files

0.5.22

2 files

0.5.21

2 files

0.5.20

2 files

0.5.19

2 files

0.5.17

2 files

0.5.16

2 files

0.5.15

2 files

0.5.14

2 files

0.5.13

2 files

0.5.12

2 files

0.5.11

2 files

0.5.10

2 files

0.5.8

2 files

0.5.7

2 files

0.5.6

2 files

0.5.5

2 files

0.5.4

1 file

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