Skip to main content

Monitor RSS/Atom feeds and deliver new items via email

Project description

feed2email

A command-line tool that monitors RSS/Atom feeds and delivers new items via email. It stores state in a local SQLite database and sends mail over SMTP.

Installation

Requires Python 3.13 or later. Published on PyPI.

uv tool install feed2email

This installs feed2email as a standalone CLI tool managed by uv. You can also use pip:

pip install feed2email

Quick start

Run the setup wizard to configure SMTP and a default recipient:

feed2email init

Add a feed:

feed2email add https://example.com/feed.xml

Fetch new items and send them:

feed2email run

By default, when you add a feed all existing items except the most recent one are marked as read. The next run delivers only the latest item plus anything published after that point.

Commands

feed2email init          Interactive setup for SMTP and recipient
feed2email config        Get, set, unset, or list configuration values
feed2email add URL       Add a feed (fetches and validates immediately)
feed2email edit REF      Edit a feed's settings (URL, dedup key, format, etc.)
feed2email remove REF    Remove a feed by URL or ID
feed2email list          List all configured feeds
feed2email pause REF     Pause delivery for a feed
feed2email unpause REF   Resume delivery for a feed
feed2email run           Fetch feeds and deliver new items

REF is either the numeric feed ID or its URL.

Global options

--db PATH overrides the database location (also settable via the FEED2EMAIL_DB environment variable). The default path is determined by platformdirs.user_data_dir("feed2email").

--verbose / -v enables INFO-level log output.

Adding feeds

feed2email add https://example.com/rss.xml \
  --recipient alice@example.com \
  --dedup-key link \
  --format html \
  --item-date

--recipient sets a feed-specific recipient (falls back to default-recipient from config). --dedup-key chooses which field prevents duplicate delivery: id (default), link, or title. --format selects email body format: text (default) or html. --item-date uses the item's publication date as the email Date header. --mark-read marks all existing items as read instead of keeping the latest unread.

Configuration

Required keys: smtp.host, smtp.port, smtp.from, smtp.encryption, default-recipient.

Optional keys: smtp.user, smtp.password, user-agent.

feed2email config smtp.host mail.example.com
feed2email config smtp.port 587
feed2email config smtp.encryption starttls
feed2email config                          # list all
feed2email config smtp.password --unset    # remove a value

Dry run

feed2email run --dry-run

Shows what would be sent without delivering mail or updating state.

How it works

On each run, for each active feed it fetches the feed, deduplicates items against previously seen entries, renders an email (plain text or HTML via Jinja2), sends it over SMTP, and records the item as seen.

Exit codes: 0 = all feeds processed, 1 = partial failure (some feeds or items failed), 2 = total failure.

Development

For contributors and developers working on feed2email itself.

git clone https://github.com/<owner>/feed2email.git
cd feed2email
uv sync                # install all dependencies including dev extras

The project uses uv for dependency management and just as a task runner.

just test              # run tests (pytest)
just lint              # lint (ruff)
just fmt               # format (ruff)
just typecheck         # type check (ty)
just check             # all of the above

Tests live in tests/ and mirror the source layout. External calls (HTTP, SMTP) are mocked; databases use temporary paths via pytest's tmp_path fixture.

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

feed2email-0.1.1.tar.gz (136.2 kB view details)

Uploaded Source

Built Distribution

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

feed2email-0.1.1-py3-none-any.whl (33.1 kB view details)

Uploaded Python 3

File details

Details for the file feed2email-0.1.1.tar.gz.

File metadata

  • Download URL: feed2email-0.1.1.tar.gz
  • Upload date:
  • Size: 136.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for feed2email-0.1.1.tar.gz
Algorithm Hash digest
SHA256 56f78f5d11236c0c9a4084209cf92821679e860edaef32ce7e57270f2fea301f
MD5 3612d6ce847428a8ad0b09b4cb28667a
BLAKE2b-256 38c57b8a3e3fe477587ba8b27c5c4e45514010dd99d59fada9bb6da6625c00b4

See more details on using hashes here.

Provenance

The following attestation bundles were made for feed2email-0.1.1.tar.gz:

Publisher: python-publish.yml on timendum/feed2email

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file feed2email-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: feed2email-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 33.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for feed2email-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7b1fd4f5b1ea40ec68a1b169f4fb19ba45bcd30e5aa6340b93e26f4d48c2afeb
MD5 a332cbaec14f29090e8c9606faa0be43
BLAKE2b-256 186ba62890f0c5bbaf8e10e549a4b68585e314114fd2676c995cde07811a29ca

See more details on using hashes here.

Provenance

The following attestation bundles were made for feed2email-0.1.1-py3-none-any.whl:

Publisher: python-publish.yml on timendum/feed2email

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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