An OPML library for Python. https://pypi.org/project/opyml/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Bauke 3d102b22a2
Add readme and repository fields
1 month ago
opyml Add readme and repository fields 1 month ago
tests Initial commit! 🌠 1 month ago
.gitignore Initial commit! 🌠 1 month ago
LICENSE-Apache Initial commit! 🌠 1 month ago
LICENSE-MIT Initial commit! 🌠 1 month ago
README.md Initial commit! 🌠 1 month ago
poetry.lock Initial commit! 🌠 1 month ago
pyproject.toml Add readme and repository fields 1 month ago

README.md

opyml

An OPML library for Python.

This is a largely identical “port” of the Rust crate.

Example

from opyml import OPML, Outline

# Create OPML documents from scratch.
document = OPML()
document.body.outlines.append(Outline(text="Example"))

# Convert documents to XML.
xml = document.to_xml()

# Parse OPML documents from XML.
document = OPML.from_xml(xml)

For complete examples check out the tests/ directory.

Development

  • Install dependencies with Poetry (poetry shell + poetry install).
  • Format code with black opyml tests.
  • Check types with mypy opyml.
  • Run tests and collect coverage with pytest --cov=opyml --cov-report html.
  • Generate documentation with pdoc opyml.

License

Dual-licensed with the Apache License, Version 2.0 and MIT license.