Listparser
Parse OPML subscription lists in Python
Install / Use
/learn @kurtmckee/ListparserREADME
.. This file is part of listparser. Copyright 2009-2025 Kurt McKee contactme@kurtmckee.org SPDX-License-Identifier: MIT
.. image:: docs/_static/banner.png :alt: listparser: Parse OPML subscription lists in Python.
If you're building a feed reader and you need to parse OPML subscription lists, you've come to the right place!
listparser makes it easy to parse and use subscription lists in multiple formats. It supports OPML and RDF+FOAF, and runs on Python 3.9+ and on PyPy 3.10.
Usage
.. code-block:: pycon
>>> import listparser
>>> result = listparser.parse(open("feeds.opml").read())
A dictionary will be returned with several keys:
meta: a dictionary of information about the subscription listfeeds: a list of feedslists: a list of subscription listsversion: a format identifier like "opml2"bozo: True if there is a problem with the list, False otherwisebozo_exception: (ifbozois 1) a description of the problem
For convenience, the result dictionary supports attribute access for its keys.
Continuing the example:
.. code-block:: pycon
>>> result.meta.title
'listparser project feeds'
>>> len(result.feeds)
2
>>> result.feeds[0].title, result.feeds[0].url
('listparser blog', 'https://kurtmckee.org/tag/listparser')
More extensive documentation is available in the docs/ directory
and online <https://listparser.readthedocs.io/en/latest/>_.
Bugs
There are going to be bugs. The best way to handle them will be to isolate the simplest possible document that susses out the bug, add that document as a test case, and then find and fix the problem.
...you can also just report the bug and leave it to someone else to fix the problem, but that won't be as much fun for you!
Bugs can be reported on GitHub <https://github.com/kurtmckee/listparser/issues>_.
Git workflow
listparser basically follows the git-flow methodology:
- Features and changes are developed in branches off the
mainbranch. They merge back into themainbranch. - Feature releases branch off the
mainbranch. The project metadata is updated (like the version and copyright years), and then the release branch merges into thereleasesbranch. Thereleasesbranch is then tagged, and then it is merged back intomain. - Hotfixes branch off the
releasesbranch. As with feature releases, the project metadata is updated, the hotfix branch merges back into thereleasesbranch, which is then tagged and merged back intomain.
Development
To set up a development environment, follow these steps at a command line:
.. code-block:: shell
# Set up a virtual environment.
python -m venv .venv
# Activate the virtual environment in Linux:
. .venv/bin/activate
# ...or in Windows Powershell:
& .venv/Scripts/Activate.ps1
# Install dependencies.
python -m pip install -U pip setuptools wheel
python -m pip install poetry pre-commit tox scriv
poetry install --all-extras
# Enable pre-commit.
pre-commit install
# Run the unit tests.
tox
When submitting a PR, be sure to create and edit a changelog fragment.
.. code-block:: shell
scriv create
The changelog fragment will be created in the changelog.d/ directory.
Edit the file to describe the changes you've made.
Related Skills
node-connect
343.3kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
claude-opus-4-5-migration
92.1kMigrate prompts and code from Claude Sonnet 4.0, Sonnet 4.5, or Opus 4.1 to Opus 4.5
frontend-design
92.1kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
model-usage
343.3kUse CodexBar CLI local cost usage to summarize per-model usage for Codex or Claude, including the current (most recent) model or a full model breakdown. Trigger when asked for model-level usage/cost data from codexbar, or when you need a scriptable per-model summary from codexbar cost JSON.
