Skip to main content

Pure Python RSS/Atom parser and feed backend API

Project description

pyfeed

pyfeed is a pure-Python RSS/Atom feed parser and backend service. It fetches, merges, filters, and normalizes feeds into clean JSON for use in frontend applications—ideal for web UIs, dashboards, or minimalist aggregators.


Features

  • RSS 2.0 and Atom 1.0 parsing
  • JSON output with clean field normalization
  • FastAPI backend with /feed, /merge, and /meta endpoints
  • Multiple URL support with feed merging
  • Duplicate item removal
  • Filtering by keyword, category, and author
  • Sorting (ascending or descending by publish date)
  • Output limit and offset (for pagination)
  • Preview mode: truncate long descriptions
  • Per-item source_url tracking
  • last_updated field in responses
  • In-memory caching for performance
  • CLI interface for quick local parsing

Installation

git clone https://github.com/jknndy/pyfeed
cd pyfeed
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

API Usage

GET /feed

Fetch, merge, and filter one or more feeds.

Query parameters:

url: one or more feed URLs

keyword: filter by keyword in title or description

category: filter by category

author: filter by author

limit: number of items to return

offset: skip N items

sort: asc or desc (default: desc)

format: json (default), text, or raw

preview: truncate description to N characters

Example:

curl "http://localhost:8000/feed?url=https://xkcd.com/rss.xml&limit=5&format=json"

POST /merge

Merge a list of feeds and return the result.

{
  "urls": ["https://xkcd.com/rss.xml", "https://hnrss.org/frontpage"]
}

GET /meta

Fetch basic metadata from a feed.

Example:

curl "http://localhost:8000/meta?url=https://xkcd.com/rss.xml"
Returns:
{
  "status": "ok",
  "title": "xkcd.com",
  "link": "https://xkcd.com/"
}

CLI Usage

python -m pyfeed.cli https://xkcd.com/rss.xml --json --limit 3

Testing

pytest tests

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

pyfeed-0.1.1.tar.gz (9.0 kB view details)

Uploaded Source

Built Distribution

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

pyfeed-0.1.1-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyfeed-0.1.1.tar.gz
  • Upload date:
  • Size: 9.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for pyfeed-0.1.1.tar.gz
Algorithm Hash digest
SHA256 ecbd0b4ce36fed59ea3c0047d41ec16e204d00a069b9e50460cf5667a52f351b
MD5 248b163e112167c95a957bc84d8591b3
BLAKE2b-256 c3883615917e8c3981774a0134787434cb4d9ca33cdd9e1458e7eab420c09056

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyfeed-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 8.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for pyfeed-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ab796f6e0da63c0c29b50a350eccbc73261e414ae08b912b7c290c40361bb7f5
MD5 9a3b7644342b9021952a89ffbc255375
BLAKE2b-256 52e4bebab9be5860ec4616d5b8ad62f6f024f6803fde57b6ae61d85f94e9a126

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