rapp
A fast, forgiving RSS, Atom, RDF and JSON Feed parser for Python, written in Rust.
import rapp
feed = rapp.parse(data) # bytes in, Feed out
print(feed.title)
for entry in feed.entries:
print(entry.published, entry.title, entry.link)
- Fast. About 4,300 feeds a second on one core and 18,000 with
parse_many, 135 to 570 times faster thanfeedparser(benchmark). - Forgiving. Real feeds are broken in all sorts of ways. rapp reads truncated downloads, wrong encodings, HTML entities, unquoted attributes and unclosed tags, and returns what it can instead of giving up (details).
- Podcast-aware. Enclosures, Media RSS and
itunes:image/itunes:durationcome out as structured fields. - Typed. Ships type stubs, including
TypedDicts forto_dict().
Install
pip install rapp
Wheels cover Python 3.10 and later on Linux (x86_64 and ARM, glibc and musl), macOS (Intel and Apple Silicon) and Windows. Anywhere else pip builds from source, which needs a Rust toolchain.
Usage
rapp parses; it doesn't fetch. Download feeds with the HTTP client you already use and pass the body as bytes:
import httpx
import rapp
data = httpx.get("https://example.com/feed.xml").content
try:
feed = rapp.parse(data)
except rapp.FeedParseError as e: # an HTML page, a sitemap, empty input...
print("not a feed:", e)
Common fields are attributes. Everything, including authors, categories,
enclosures and media, is in to_dict():
feed.title, feed.link, feed.language, feed.updated
entry = feed.entries[0]
entry.title, entry.link, entry.published, entry.content
d = feed.to_dict() # {"feed": {...}, "entries": [{...}, ...]}
d["entries"][0]["enclosures"] # [{"url": ..., "length": ..., "type": ...}]
Many feeds at once
parse_many parses a batch across all cores, outside the GIL, and returns the
feeds in input order:
feeds = rapp.parse_many(list_of_bytes)
If any feed in the batch fails, parse_many raises FeedParseError and you
get no results for the rest. When a batch may contain non-feeds, call
parse per item instead, or split the batch.
API
rapp.parse(data: bytes) -> rapp.Feed
rapp.parse_many(blobs: list[bytes]) -> list[rapp.Feed]
rapp.FeedParseError # the same class as ValueError
Feed |
Entry |
|---|---|
title |
title |
link |
link |
description |
description |
language |
content |
generator |
published |
updated |
updated |
id |
id |
icon, logo |
|
entries |
|
to_dict() |
to_dict() |
Every attribute except entries is str | None. Feed and Entry are
read-only and safe to share between threads.
to_dict() adds the fields that have no attribute:
- feed:
links,image(url,title,link,width,height),itunes_image,authors,categories - entry:
links,itunes_image,itunes_duration(as written in the feed),authors,categories,enclosures,media
Every key is always present: a missing value is None or an empty list. See
src/rapp/_rapp.pyi for the full schema.
Formats
- RSS 2.0, with the content, Dublin Core, Media RSS, iTunes and
atom:linkextensions - Atom 1.0, including
type="xhtml"content - RDF / RSS 1.0, with Dublin Core
- JSON Feed 1.0 and 1.1
The format is detected from the content, not from headers or file names.
Output conventions
- Dates are UTC ISO 8601:
2006-01-02T13:04:05+00:00. A date rapp can't parse is passed through as written. - HTML in descriptions and content is returned as it is, not sanitized. Sanitize it before you render it.
What it copes with
Each of these comes from a feed that broke a parser in production:
| The feed has | rapp |
|---|---|
| A download cut off mid-tag or mid-CDATA | Returns every entry that was complete |
| A UTF-16 BOM, a wrong encoding declaration, or invalid UTF-8 | Detects the encoding; invalid bytes become � |
HTML entities such as or ’, which XML doesn't define |
Decodes them |
Unescaped HTML (<b>, <br>) inside a description |
Keeps it as markup |
Unquoted attributes (<link href=x>) |
Quotes them without touching text such as E=mc2 |
| An unclosed tag inside Atom XHTML content | Keeps the entries that follow |
A doubled <?xml ?> declaration |
Repairs it |
24:00 as a time |
Rolls over to 00:00 the next day |
RDF's <image> beside <channel> |
Reads it as the feed image |
Benchmark
Parsing the bundled corpus of 200 real-world feeds (45 MB, 6,600 entries) on an Apple M4 Pro (14 cores), Python 3.14.7, fastest of five runs:
| Parser | Time | Feeds/s | vs feedparser |
|---|---|---|---|
rapp.parse |
46 ms | 4,351 | 135× |
rapp.parse_many |
11 ms | 18,304 | 568× |
| fastfeedparser 0.6.5 | 65 ms | 3,070 | 95× |
| feedparser 6.0.14 | 6,204 ms | 32 | 1× |
To run it yourself:
pip install . feedparser fastfeedparser
python benchmark/benchmark.py
Development
cargo test # Rust tests
pip install -e . pytest # build the extension, then
pytest # Python tests
cargo fmt && cargo clippy # Rust style and lints
ruff check . && ruff format . # Python style and lints
The Rust parser lives in crates/rapp-core and has no Python dependency.
crates/rapp-py holds the pyo3 bindings and src/rapp the Python package.
Snapshot tests compare every feed in tests/feeds/ with the expected JSON
next to it; see tests/test_snapshots.py for how
to add one.
To release: bump version in Cargo.toml (the only place it lives), move
the changelog's "Unreleased" notes under the new version, merge, then publish
a GitHub release tagged vX.Y.Z. The release workflow builds the wheels, tests
them on every platform and uploads them to PyPI.
Bugs and ideas are welcome as issues. A feed that rapp gets wrong is the most useful report there is. To report a security issue, see SECURITY.md.
Background
rapp started as a fork of Kagi's fastfeedparser, took inspiration from it, and became its own parser, written from scratch in Rust. The test and benchmark feeds come from fastfeedparser.
License
MIT. See LICENSE.
Metadata
Release files for rapp 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| rapp-0.1.0.tar.gz | 29.4 kB | With provenance | Details for rapp-0.1.0.tar.gz |
Built distributions (wheels)
Total release size: 8.3 MB
Release files / rapp-0.1.0.tar.gz
| Download URL | rapp-0.1.0.tar.gz |
|---|---|
| Size | 29.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cb626714bf8f91b5b08719ad30287e6ce4bcf6569fa54ae23f7cd444a93347b6
|
|
BLAKE2b-256 checksum How to use checksums |
d275dddc15e09c6e27db67690557ae626c1877b862beeb0c1d85acf6cd2b4596
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.
Transparency logRelease files / rapp-0.1.0-cp310-abi3-win_amd64.whl
| Download URL | rapp-0.1.0-cp310-abi3-win_amd64.whl |
|---|---|
| Size | 1.0 MB |
| Tags | CPython 3.10 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
37db16f828552fd090709ee756c215952a2ef305e24690cf7cd32a4e7d35be06
|
|
BLAKE2b-256 checksum How to use checksums |
08f3dff6b5edb02f6dfe5cd64bac75e016fa89797699278a87d26ec3dd9cba9b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.
Transparency logRelease files / rapp-0.1.0-cp310-abi3-musllinux_1_2_x86_64.whl
| Download URL | rapp-0.1.0-cp310-abi3-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 1.4 MB |
| Tags | CPython 3.10 Linux musl 1.2+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
90c2911958e51649d0bdbee2839140958fd1754464f2f8e68b18449e9d618e45
|
|
BLAKE2b-256 checksum How to use checksums |
9c70e2c1e3de06f155b673b64325b6ceb9c3163e19eeea928b39a7fd58ca5569
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.
Transparency logRelease files / rapp-0.1.0-cp310-abi3-musllinux_1_2_aarch64.whl
| Download URL | rapp-0.1.0-cp310-abi3-musllinux_1_2_aarch64.whl |
|---|---|
| Size | 1.3 MB |
| Tags | CPython 3.10 Linux musl 1.2+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
5c05dcb4edb9583712180ca91e3803bc971632cdc765b9362fd11dbcacae38c9
|
|
BLAKE2b-256 checksum How to use checksums |
d7b68c3f06d782832d1db56eef17dd7768b9a73f2a8e9af286c1a91dac661bdb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.
Transparency logRelease files / rapp-0.1.0-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
| Download URL | rapp-0.1.0-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl |
|---|---|
| Size | 1.2 MB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
80cf44f4114e193b49ee11d44a87ae2d57e020015ada18f4de276b37d06f1aac
|
|
BLAKE2b-256 checksum How to use checksums |
aaf8e981d2c13bf851a95a641eda3b4f0e1db7cff4e54429d48cfd57a488c3e4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.
Transparency logRelease files / rapp-0.1.0-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
| Download URL | rapp-0.1.0-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl |
|---|---|
| Size | 1.1 MB |
| Tags | CPython 3.10 Linux glibc 2.17+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
4ea766c5de0de8399d0f6fae1f47d5ff9c016e3d07f14f61da5c10603cfb2896
|
|
BLAKE2b-256 checksum How to use checksums |
85339516db5b4914ea4fadf8c174a8dcf28b2cf3a6873bc260596e0f23e05a44
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.
Transparency logRelease files / rapp-0.1.0-cp310-abi3-macosx_10_12_universal2.macosx_10_12_x86_64.macosx_11_0_arm64.whl
| Download URL | rapp-0.1.0-cp310-abi3-macosx_10_12_universal2.macosx_10_12_x86_64.macosx_11_0_arm64.whl |
|---|---|
| Size | 2.2 MB |
| Tags | CPython 3.10 abi3 macOS 10.12+ universal2 (ARM64, x86-64) macOS 10.12+ x86-64 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
4d62bad09ee8710bd9af71949e466c8b60291bffd61b3264f3119a22738e73d4
|
|
BLAKE2b-256 checksum How to use checksums |
c5eed7fceab0d6c980c55ad28c36608b48fc78ceb2e7954e0456a4d4e49cab94
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.
Transparency logSecurity for rapp 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 7 files in this release have been uploaded with provenance metadata.
Attestation for rapp-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.