Skip to main content

A Python feed reader library.

Project description

reader is a Python feed reader library.

It aims to allow writing feed reader applications without any business code, and without enforcing a dependency on a particular framework.

build status (GitHub Actions) code coverage documentation status PyPI status checked with mypy code style: black

reader allows you to:

  • retrieve, store, and manage Atom, RSS, and JSON feeds

  • mark entries as read or important

  • add tags and metadata to feeds

  • filter feeds and articles

  • full-text search articles

  • get statistics on feed and user activity

  • write plugins to extend its functionality

  • skip all the low level stuff and focus on what makes your feed reader different

…all these with:

  • a stable, clearly documented API

  • excellent test coverage

  • fully typed Python

What reader doesn’t do:

  • provide an UI

  • provide a REST API (yet)

  • depend on a web framework

  • have an opinion of how/where you use it

The following exist, but are optional (and frankly, a bit unpolished):

  • a minimal web interface

    • that works even with text-only browsers

    • with automatic tag fixing for podcasts (MP3 enclosures)

  • a command-line interface

Documentation: reader.readthedocs.io

Usage:

$ pip install reader
>>> from reader import make_reader
>>>
>>> reader = make_reader('db.sqlite')
>>> reader.add_feed('http://www.hellointernet.fm/podcast?format=rss')
>>> reader.update_feeds()
>>>
>>> entries = list(reader.get_entries())
>>> [e.title for e in entries]
['H.I. #108: Project Cyclops', 'H.I. #107: One Year of Weird', ...]
>>>
>>> reader.mark_entry_as_read(entries[0])
>>>
>>> [e.title for e in reader.get_entries(read=False)]
['H.I. #107: One Year of Weird', 'H.I. #106: Water on Mars', ...]
>>> [e.title for e in reader.get_entries(read=True)]
['H.I. #108: Project Cyclops']
>>>
>>> reader.update_search()
>>>
>>> for e in list(reader.search_entries('year'))[:3]:
...     title = e.metadata.get('.title')
...     print(title.value, title.highlights)
...
H.I. #107: One Year of Weird (slice(15, 19, None),)
H.I. #52: 20,000 Years of Torment (slice(17, 22, None),)
H.I. #83: The Best Kind of Prison ()

Project details


Release history Release notifications | RSS feed

This version

2.6

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

reader-2.6.tar.gz (1.4 MB view details)

Uploaded Source

Built Distribution

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

reader-2.6-py3-none-any.whl (130.9 kB view details)

Uploaded Python 3

File details

Details for the file reader-2.6.tar.gz.

File metadata

  • Download URL: reader-2.6.tar.gz
  • Upload date:
  • Size: 1.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0

File hashes

Hashes for reader-2.6.tar.gz
Algorithm Hash digest
SHA256 48ad64952e0850d231dc702be6003d63e265a254648a421f58e6a49974b55d05
MD5 de2880fa212fd29281cb8fbe47892b5b
BLAKE2b-256 f32ccb22b47797a89e35510d8f69d233a23c382da79b2f7b9a9985db341a1a0c

See more details on using hashes here.

File details

Details for the file reader-2.6-py3-none-any.whl.

File metadata

  • Download URL: reader-2.6-py3-none-any.whl
  • Upload date:
  • Size: 130.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0

File hashes

Hashes for reader-2.6-py3-none-any.whl
Algorithm Hash digest
SHA256 329ad78d5dcf39dab899ce85f051ca6121e82abb978b8f4f93e2aa87a51e0b15
MD5 a3c06c5555f3b464258cc1cde048ecb2
BLAKE2b-256 5a669a7cd91109addc36e792c449b26445c5554cea87365fe0a8941c055e0267

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