opyml/README.md

44 lines
1.3 KiB
Markdown
Raw Permalink Normal View History

2022-09-25 21:44:09 +00:00
# OPyML 🐍
2021-10-25 12:54:11 +00:00
2022-09-25 21:44:09 +00:00
> **OPML library for Python.**
2021-10-25 12:54:11 +00:00
2022-09-25 21:44:09 +00:00
## Features
* Supports all OPML versions.
* Minimal use of dependencies.
* 100% typed and tested.
2021-10-25 12:54:11 +00:00
## Example
```python
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)
```
2022-09-26 08:41:05 +00:00
See also the [examples directory](https://git.bauke.xyz/Holllo/opyml/src/branch/main/examples).
2021-10-25 12:54:11 +00:00
## Development
2022-09-25 21:44:09 +00:00
* Install dependencies with `poetry shell && poetry install`.
2021-10-25 12:54:11 +00:00
* Format code with `black opyml tests`.
* Check types with `mypy opyml`.
2022-09-25 21:44:09 +00:00
* Run tests and collect coverage with `pytest --cov opyml --cov-report html`.
2021-10-25 12:54:11 +00:00
* Generate documentation with `pdoc opyml`.
2022-09-25 21:44:09 +00:00
## Feedback
Found a problem or want to request a new feature? Email [helllo@holllo.org](mailto:helllo@holllo.org) and I'll see what I can do for you.
2021-10-25 12:54:11 +00:00
## License
2022-09-25 21:44:09 +00:00
Distributed under the [Apache License 2.0](https://spdx.org/licenses/Apache-2.0.html) and [MIT](https://spdx.org/licenses/MIT.html) licenses, see [LICENSE-Apache](https://git.bauke.xyz/Holllo/opyml/src/branch/main/LICENSE-Apache) and [LICENSE-MIT](https://git.bauke.xyz/Holllo/opyml/src/branch/main/LICENSE-MIT) for more information.