Skip to main content

An example python project

Project description

Sending Notifications to Your Smartphone for Specific Keywords in Emails

The project involves creating a program that reads gmail and sends notifications to your smartphone using slack when a specific keyword appears.

License Build Status codecov PyPI Documentation Status

Overview

This idea came from the challenge of having to sort through many emails every day to find the important ones. Gmail already has a labeling function that classifies emails based on specific email addresses as filters. This project aims to create a function that sends notifications based on keywords using slack and smartphones. There is also potential to expand this project to find information in other ways besides just keywords.

Dependencies

  • slack_sdk

Usage

Quick Start

  1. Install the package:
pip install project_progress
  1. Set up your Slack webhook URL. Follow these instructions to create a Slack webhook URL.

  2. Create a Python script and import the required functions:

from project_progress import read_email_titles, sendSlackWebhook
  1. Use the functions to read email titles and send Slack notifications based on specific keywords:
email_titles = read_email_titles()
keyword = "important"

for title in email_titles:
    if keyword in title:
        sendSlackWebhook("Keyword found in email title: " + title, webhook_url)

Lint/Test

To run linting and tests, you need to have the following tools installed:

Flake8 for linting pytest for testing Install them using pip:

pip install flake8 pytest

Linting

To lint your code, run the following command in your project directory:

flake8

Testing

To run tests, execute the following command in your project directory:

pytest

For more detailed usage instructions and available options, please refer to the documentation.

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

project_2023-0.1.2.tar.gz (15.3 kB view hashes)

Uploaded Source

Built Distribution

project_2023-0.1.2-py3-none-any.whl (16.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page