Skip to content

Releases: chirag-jn/notipyer

v0.3.5

20 Jun 05:31
Compare
Choose a tag to compare

Notipyer

Notification Triggers for Python

Send async email and slack notifications via Python. Get updates/crashlogs from your scripts with ease.

Installation

python -m venv env
source env/bin/activate
pip install notipyer

Email Notifications

Notipyer currently supports Gmail accounts as senders. To allow the library to use your Gmail account, make the following changes:

  1. Turn on 2-Step authentication. Ref
  2. Create an app password. Ref
  3. While creating an app password, select app as "Other (Custom name)" and enter a name of your choice.
  4. Use the password obtained from app password for the configuration step below.
  5. More information can be obtained on the wiki page here

Configuration

from notipyer.email_notify import set_email_config

SENDER_EMAIL = '[email protected]'
SENDER_PASS = 'my_app_password'
SENDER_NAME = 'my name'
set_email_config(SENDER_EMAIL, SENDER_PASS, SENDER_NAME)

Sending Email

from notipyer.email_notify import send_email

subject = 'My Email Subject'
body = 'My Email Body'
reply_to_recipient = '[email protected]' # Can be None
to_recipients = ['[email protected]', '[email protected]'] # Can be None
cc_recipients = ['[email protected]', '[email protected]'] # Can be None
bcc_recipients = ['[email protected]', '[email protected]'] # Can be None
attachment_path = 'path_to_my_file' # Can be None
html = """\
<html>
  <head></head>
  <body>
    <p>Hi!<br>
       How are you?<br>
    </p>
  </body>
</html>
""" # Can be None
is_async = True # Sent as an async email only if this parameter is True

send_email(subject, body, to_recipients, reply_to_recipient, cc_recipients, bcc_recipients, attachment_path, html_text, is_async)

Slack Notifications

Notipyer currently supports running a single workplace install only.

For setting up token keys for using slack notifications, follow the wiki page here

Configuration

from notipyer.slack_notify import set_slack_token_config

# Follow the wiki for getting the bot token
BOT_TOKEN = 'xoxb-12345678990123-1234567890123-abcdefghijklmnopqrstuvwx' 
set_slack_token_config(BOT_TOKEN)

Sending Message

from notipyer.slack_notify import send_message

# the bot should be added to the channel
channel = 'my-channel-name'
message = 'my-message'

set_slack_token_config(SLACK_TOKEN)
send_message(channel, message)

Contact

Chirag Jain

v0.3.3

28 Mar 19:22
0d5808b
Compare
Choose a tag to compare

Notipyer

Notification Triggers for Python

Send async email and slack notifications via Python. Get updates/crashlogs from your scripts with ease.

Installation

python -m venv env
source env/bin/activate
pip install notipyer

Email Notifications

Notipyer currently supports Gmail accounts as senders. To allow the library to use your Gmail account, make the following changes:

  1. Turn on 2-Step authentication. Ref
  2. Create an app password. Ref
  3. While creating an app password, select app as "Other (Custom name)" and enter a name of your choice.
  4. Use the password obtained from app password for the configuration step below.
  5. More information can be obtained on the wiki page here

Configuration

from notipyer.email_notify import set_email_config

SENDER_EMAIL = '[email protected]'
SENDER_PASS = 'my_app_password'
SENDER_NAME = 'my name'
set_email_config(SENDER_EMAIL, SENDER_PASS, SENDER_NAME)

Sending Email

from notipyer.email_notify import send_email

subject = 'My Email Subject'
body = 'My Email Body'
to_recipients = ['[email protected]', '[email protected]'] # Can be None
cc_recipients = ['[email protected]', '[email protected]'] # Can be None
bcc_recipients = ['[email protected]', '[email protected]'] # Can be None
attachment_path = 'path_to_my_file' # Can be None
html = """\
<html>
  <head></head>
  <body>
    <p>Hi!<br>
       How are you?<br>
    </p>
  </body>
</html>
""" # Can be None
is_async = True # Sent as an async email only if this parameter is True

send_email(subject, body, to_recipients, cc_recipients, bcc_recipients, attachment_path, html_text, is_async)

Slack Notifications

Notipyer currently supports running a single workplace install only.

For setting up token keys for using slack notifications, follow the wiki page here

Configuration

from notipyer.slack_notify import set_slack_token_config

# Follow the wiki for getting the bot token
BOT_TOKEN = 'xoxb-12345678990123-1234567890123-abcdefghijklmnopqrstuvwx' 
set_slack_token_config(BOT_TOKEN)

Sending Message

from notipyer.slack_notify import send_message

# the bot should be added to the channel
channel = 'my-channel-name'
message = 'my-message'

set_slack_token_config(SLACK_TOKEN)
send_message(channel, message)

Contact

Chirag Jain

v0.3.2

09 Feb 21:04
e424364
Compare
Choose a tag to compare

Notipyer

Notification Triggers for Python

Send async email and slack notifications via Python. Get updates/crashlogs from your scripts with ease.

Installation

python -m venv env
source env/bin/activate
pip install notipyer

Email Notifications

Notipyer currently supports Gmail accounts as senders. To allow the library to use your Gmail account, make the following changes:

  1. Turn on 2-Step authentication. Ref
  2. Create an app password. Ref
  3. While creating an app password, select app as "Other (Custom name)" and enter a name of your choice.
  4. Use the password obtained from app password for the configuration step below.
  5. More information can be obtained on the wiki page here

Configuration

from notipyer.email_notify import set_email_config

SENDER_EMAIL = '[email protected]'
SENDER_PASS = 'my_app_password'
SENDER_NAME = 'my name'
set_email_config(SENDER_EMAIL, SENDER_PASS, SENDER_NAME)

Sending Email

from notipyer.email_notify import send_email

subject = 'My Email Subject'
body = 'My Email Body'
to_recipients = ['[email protected]', '[email protected]'] # Can be None
cc_recipients = ['[email protected]', '[email protected]'] # Can be None
bcc_recipients = ['[email protected]', '[email protected]'] # Can be None
attachment_path = 'path_to_my_file' # Can be None
is_async = True # Sent as an async email only if this parameter is True

send_email(subject, body, to_recipients, cc_recipients, bcc_recipients, attachment_path, is_async)

Slack Notifications

Notipyer currently supports running a single workplace install only.

For setting up token keys for using slack notifications, follow the wiki page here

Configuration

from notipyer.slack_notify import set_slack_token_config

# Follow the wiki for getting the bot token
BOT_TOKEN = 'xoxb-12345678990123-1234567890123-abcdefghijklmnopqrstuvwx' 
set_slack_token_config(BOT_TOKEN)

Sending Message

from notipyer.slack_notify import send_message

# the bot should be added to the channel
channel = 'my-channel-name'
message = 'my-message'

set_slack_token_config(SLACK_TOKEN)
send_message(channel, message)

Contact

Chirag Jain

v0.3.1

09 Feb 19:46
d445716
Compare
Choose a tag to compare

Notipyer

Notification Triggers for Python

Send async email and slack notifications via Python. Get updates/crashlogs from your scripts with ease.

Installation

python -m venv env
source env/bin/activate
pip install notipyer

Email Notifications

Notipyer currently supports Gmail accounts as senders. To allow the library to use your Gmail account, make the following changes:

  1. Turn on 2-Step authentication. Ref
  2. Create an app password. Ref
  3. While creating an app password, select app as "Other (Custom name)" and enter a name of your choice.
  4. Use the password obtained from app password for the configuration step below.
  5. More information can be obtained on the wiki page here

Configuration

from notipyer.email_notify import set_email_config

SENDER_EMAIL = '[email protected]'
SENDER_PASS = 'my_app_password'
SENDER_NAME = 'my name'
set_email_config(SENDER_EMAIL, SENDER_PASS, SENDER_NAME)

Sending Email

from notipyer.email_notify import send_email

subject = 'My Email Subject'
body = 'My Email Body'
to_recipients = ['[email protected]', '[email protected]'] # Can be None
cc_recipients = ['[email protected]', '[email protected]'] # Can be None
bcc_recipients = ['[email protected]', '[email protected]'] # Can be None
attachment_path = 'path_to_my_file' # Can be None

send_email(subject, body, to_recipients, cc_recipients, bcc_recipients, attachment_path)

Slack Notifications

Notipyer currently supports running a single workplace install only.

For setting up token keys for using slack notifications, follow the wiki page here

Configuration

from notipyer.slack_notify import set_slack_token_config

# Follow the wiki for getting the bot token
BOT_TOKEN = 'xoxb-12345678990123-1234567890123-abcdefghijklmnopqrstuvwx' 
set_slack_token_config(BOT_TOKEN)

Sending Message

from notipyer.slack_notify import send_message

# the bot should be added to the channel
channel = 'my-channel-name'
message = 'my-message'

set_slack_token_config(SLACK_TOKEN)
send_message(channel, message)

Contact

Chirag Jain

v0.2.3

25 Dec 09:22
6e539ce
Compare
Choose a tag to compare

Notipyer

Notification Triggers for Python

Send async email and slack notifications via Python. Get updates/crashlogs from your scripts with ease.

Installation

python -m venv env
source env/bin/activate
pip install notipyer

Email Notifications

Notipyer currently supports Gmail accounts as senders. To allow the library to use your Gmail account, make the following changes:

  1. Turn on 2-Step authentication. Ref
  2. Create an app password. Ref
  3. While creating an app password, select app as "Other (Custom name)" and enter a name of your choice.
  4. Use the password obtained from app password for the configuration step below.
  5. More information can be obtained on the wiki page here

Configuration

from notipyer.email_notify import set_email_config

SENDER_EMAIL = '[email protected]'
SENDER_PASS = 'my_app_password'
SENDER_NAME = 'my name'
set_email_config(SENDER_EMAIL, SENDER_PASS, SENDER_NAME)

Sending Email

from notipyer.email_notify import send_email

subject = 'My Email Subject'
body = 'My Email Body'
to_recipients = ['[email protected]', '[email protected]'] # Can be None
cc_recipients = ['[email protected]', '[email protected]'] # Can be None
bcc_recipients = ['[email protected]', '[email protected]'] # Can be None

send_email(subject, body, to_recipients, cc_recipients, bcc_recipients)

Slack Notifications

Notipyer currently supports running a single workplace install only.

For setting up token keys for using slack notifications, follow the wiki page here

Configuration

from notipyer.slack_notify import set_slack_token_config

# Follow the wiki for getting the bot token
BOT_TOKEN = 'xoxb-12345678990123-1234567890123-abcdefghijklmnopqrstuvwx' 
set_slack_token_config(BOT_TOKEN)

Sending Message

from notipyer.slack_notify import send_message

# the bot should be added to the channel
channel = 'my-channel-name'
message = 'my-message'

set_slack_token_config(SLACK_TOKEN)
send_message(channel, message)

Contact

Chirag Jain

v0.2.1

05 Sep 09:28
d1fe2a0
Compare
Choose a tag to compare

Notipyer

Notification Triggers for Python

Send async email and slack notifications via Python. Get updates/crashlogs from your scripts with ease.

Installation

python -m venv env
source env/bin/activate
pip install notipyer

Email Notifications

Notipyer currently supports Gmail accounts as senders. To allow the library to use your Gmail account, make the following changes:

  1. Turn on 2-Step authentication. Ref
  2. Create an app password. Ref
  3. While creating an app password, select app as "Other (Custom name)" and enter a name of your choice.
  4. Use the password obtained from app password for the configuration step below.
  5. More information can be obtained on the wiki page here

Configuration

from notipyer.email_notify import set_email_config

SENDER_EMAIL = '[email protected]'
SENDER_PASS = 'my_app_password'
SENDER_NAME = 'my name'
set_email_config(SENDER_EMAIL, SENDER_PASS, SENDER_NAME)

Sending Email

from notipyer.email_notify import send_email

subject = 'My Email Subject'
body = 'My Email Body'
to_recipients = ['[email protected]', '[email protected]'] # Can be None
cc_recipients = ['[email protected]', '[email protected]'] # Can be None
bcc_recipients = ['[email protected]', '[email protected]'] # Can be None

send_email(subject, body, to_recipients, cc_recipients, bcc_recipients)

Slack Notifications

Notipyer currently supports running a single workplace install only.

For setting up token keys for using slack notifications, follow the wiki page here

Configuration

from notipyer.slack_notify import set_slack_token_config

# Follow the wiki for getting the bot token
BOT_TOKEN = 'xoxb-12345678990123-1234567890123-abcdefghijklmnopqrstuvwx' 
set_slack_token_config(BOT_TOKEN)

Sending Message

from notipyer.slack_notify import send_message

# the bot should be added to the channel
channel = 'my-channel-name'
message = 'my-message'

set_slack_token_config(SLACK_TOKEN)
send_message(channel, message)

Contact

Chirag Jain

v0.2.0

27 Aug 21:14
b85bb4a
Compare
Choose a tag to compare

Notipyer

Notification Triggers for Python

Send async email and slack notifications via Python. Get updates/crashlogs from your scripts with ease.

Installation

python -m venv env
source env/bin/activate
pip install notipyer

Email Notifications

Notipyer currently supports Gmail accounts as senders. To allow the library to use your Gmail account, make the following changes:

  1. Turn on 2-Step authentication. Ref
  2. Create an app password. Ref
  3. While creating an app password, select app as "Other (Custom name)" and enter a name of your choice.
  4. Use the password obtained from app password for the configuration step below.
  5. More information can be obtained on the wiki page here

Configuration

from notipyer.email_notify import set_email_config

SENDER_EMAIL = '[email protected]'
SENDER_PASS = 'my_app_password'
set_email_config(SENDER_EMAIL, SENDER_PASS)

Sending Email

from notipyer.email_notify import send_email

subject = 'My Email Subject'
body = 'My Email Body'
to_recipients = ['[email protected]', '[email protected]'] # Can be None
cc_recipients = ['[email protected]', '[email protected]'] # Can be None
bcc_recipients = ['[email protected]', '[email protected]'] # Can be None

send_email(subject, body, to_recipients, cc_recipients, bcc_recipients)

Slack Notifications

Notipyer currently supports running a single workplace install only.

For setting up token keys for using slack notifications, follow the wiki page here

Configuration

from notipyer.slack_notify import set_slack_token_config

# Follow the wiki for getting the bot token
BOT_TOKEN = 'xoxb-12345678990123-1234567890123-abcdefghijklmnopqrstuvwx' 
set_slack_token_config(BOT_TOKEN)

Sending Message

from notipyer.slack_notify import send_message

# the bot should be added to the channel
channel = 'my-channel-name'
message = 'my-message'

set_slack_token_config(SLACK_TOKEN)
send_message(channel, message)

Contact

Chirag Jain

v0.1.2

29 May 19:27
Compare
Choose a tag to compare

Notipyer

Notification triggers for Python

Send async email notifications via Python. Get updates/crashlogs from your scripts with ease.

Installation

python -m venv env
source env/bin/activate
pip install notipyer

Email Notifications

Notipyer currently supports Gmail accounts as senders. To allow the library to use your gmail account, make the following changes:

  1. Turn off 2-Step authentication. Ref
  2. Turn on "Less Secure App Access" here

Configuration

from notipyer.email_notify import set_email_config

SENDER_EMAIL = '[email protected]'
SENDER_PASS = 'password'
set_email_config(SENDER_EMAIL, SENDER_PASS)

Sending Email

from notipyer.email_notify import send_email

subject = 'My Email Subject'
body = 'My Email Body'
to_recipients = ['[email protected]', '[email protected]'] # Can be None
cc_recipients = ['[email protected]', '[email protected]'] # Can be None
bcc_recipients = ['[email protected]', '[email protected]'] # Can be None

send_email(subject, body, to_recipients, cc_recipients, bcc_recipients)

Contact

Chirag Jain

v0.1.1

29 May 17:29
Compare
Choose a tag to compare

Notipyer

Notification triggers for Python

Installation

python -m venv env
source env/bin/activate
pip install notipyer

Email Notifications

Notipyer currently supports Gmail accounts as senders. To allow the library to use your gmail account, make the following changes:

  1. Turn off 2-Step authentication. Ref
  2. Turn on "Less Secure App Access" here

Configuration

from notipyer.email_notify import set_email_config

SENDER_EMAIL = '[email protected]'
SENDER_PASS = 'password'
set_email_config(SENDER_EMAIL, SENDER_PASS)

Sending Email

from notipyer.email_notify import send_email

subject = 'My Email Subject'
body = 'My Email Body'
to_recipients = ['[email protected]', '[email protected]'] # Can be None
cc_recipients = ['[email protected]', '[email protected]'] # Can be None
bcc_recipients = ['[email protected]', '[email protected]'] # Can be None

send_email(subject, body, to_recipients, cc_recipients, bcc_recipients)

Contact

Chirag Jain

v.0.1.3

29 May 20:03
Compare
Choose a tag to compare

Notipyer

Notification triggers for Python

Send async email notifications via Python. Get updates/crashlogs from your scripts with ease.

Installation

python -m venv env
source env/bin/activate
pip install notipyer

Email Notifications

Notipyer currently supports Gmail accounts as senders. To allow the library to use your gmail account, make the following changes:

  1. Turn off 2-Step authentication. Ref
  2. Turn on "Less Secure App Access" here

Configuration

from notipyer.email_notify import set_email_config

SENDER_EMAIL = '[email protected]'
SENDER_PASS = 'password'
set_email_config(SENDER_EMAIL, SENDER_PASS)

Sending Email

from notipyer.email_notify import send_email

subject = 'My Email Subject'
body = 'My Email Body'
to_recipients = ['[email protected]', '[email protected]'] # Can be None
cc_recipients = ['[email protected]', '[email protected]'] # Can be None
bcc_recipients = ['[email protected]', '[email protected]'] # Can be None

send_email(subject, body, to_recipients, cc_recipients, bcc_recipients)

Contact

Chirag Jain