Skip to main content

Automatic coupon clipper for Safeway's online "Safeway for U" coupons

Project description

Automatic Safeway coupon clipper

PyPI PyPI - Python Version Build codecov GitHub stars

safeway-coupons is a script that will log in to an account on safeway.com, and attempt to select all of the "Safeway for U" electronic coupons on the site so they don't have to each be clicked manually.

For best results, run this program once a day or so with a cron daemon.

Installation

safeway-coupons is available on PyPI:

pip install safeway-coupons

For email support, sendmail is needed.

Usage

For full usage options, run

safeway-coupons --help

Configuration

safeway-coupons can clip coupons for one or more Safeway accounts in a single run, depending on the configuration method used.

If a sender email address is configured, a summary email will be sent for each Safeway account via sendmail. The email recipient defaults to the Safeway account email address, but can be overridden for each account.

Accounts are searched via the following methods in the listed order. Only one account configuration method may be used at a time.

With environment variables

A single Safeway account can be configured with environment variables:

  • SAFEWAY_ACCOUNT_USERNAME: Account email address (required)
  • SAFEWAY_ACCOUNT_PASSWORD: Account password (required)
  • SAFEWAY_ACCOUNT_MAIL_FROM: Sender address for email summary
  • SAFEWAY_ACCOUNT_MAIL_TO: Recipient address for email summary

With config file

Multiple Safeway accounts can be provided in an ini-style config file, with a section for each account. For example:

email_sender = sender@example.com   ; optional

[safeway.account@example.com]       ; required
password = 12345                    ; required
notify = your.email@example.com     ; optional

Provide the path to your config file using the -c or --accounts-config option:

safeway-coupons -c path/to/config/file

Development

  • Setup: poetry install
  • Run all tests: poetry run poe test
  • Fix linting errors: poetry run poe lint

Created from smkent/cookie-python using cookiecutter

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

safeway-coupons-0.1.5.tar.gz (24.0 kB view details)

Uploaded Source

Built Distribution

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

safeway_coupons-0.1.5-py3-none-any.whl (25.0 kB view details)

Uploaded Python 3

File details

Details for the file safeway-coupons-0.1.5.tar.gz.

File metadata

  • Download URL: safeway-coupons-0.1.5.tar.gz
  • Upload date:
  • Size: 24.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for safeway-coupons-0.1.5.tar.gz
Algorithm Hash digest
SHA256 c3e5b925a2306ee5a620161ea9dfcde8ff8ea4fbe3840676168e807c43118f97
MD5 df9b54e109fdf28851fce4c2ce79c0ca
BLAKE2b-256 d5718cd55eec6311202b5f7f9cee0d4845e15158e41050c5aa3c0de317f529cb

See more details on using hashes here.

File details

Details for the file safeway_coupons-0.1.5-py3-none-any.whl.

File metadata

File hashes

Hashes for safeway_coupons-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 8d03059144b65b2b268bdbfc8208ced08d12f3f62bd03de540ac0f62e2f7b8d2
MD5 cebd5d8a69fd2c4baccfd7f23caaf0a3
BLAKE2b-256 882085d5eb65ec992f5433ecb19f118466f5d4835ca8a8d7e782f48ad066fd44

See more details on using hashes here.

Supported by

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