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.0.tar.gz (68.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.0-py3-none-any.whl (33.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: feed2email-0.1.0.tar.gz
  • Upload date:
  • Size: 68.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.0.tar.gz
Algorithm Hash digest
SHA256 4d57b8cb11777cea1018c2236796c8fbf11cb281ed019d7ba7412268ff97dc52
MD5 25a756e5022ab53779bf8c12265aa5ce
BLAKE2b-256 42c7f81972bce748f2a27cb777a5bc39ff922e270b15d371c20e1a92e5b189da

See more details on using hashes here.

Provenance

The following attestation bundles were made for feed2email-0.1.0.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.0-py3-none-any.whl.

File metadata

  • Download URL: feed2email-0.1.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a1a4ddea7ae3311e51bbe3bca476d7da48eedbf6f9b39812fb724d13cea735af
MD5 1b469e8c49f59e4c849f0fb31fe35917
BLAKE2b-256 70c1dfaaacec6e80792e3d649490c3b47d5bf5fc9ebaa963362cb68263e1f4e2

See more details on using hashes here.

Provenance

The following attestation bundles were made for feed2email-0.1.0-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