Metadata-Version: 2.1
Name: palace-webpub-manifest-parser
Version: 3.0.0
Summary: A parser for the Readium Web Publication Manifest, OPDS 2.0 and ODL formats.
Home-page: https://github.com/ThePalaceProject/webpub-manifest-parser
License: Apache-2.0
Keywords: Readium Web Publication Manifest,RWPM,Open Publication Distribution System 2.0,OPDS 2.0,ODL
Author: The Palace Project
Author-email: info@thepalaceproject.org
Requires-Python: >=3.7,<4
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Dist: jsonschema (>=3.2.0,<4.0.0)
Requires-Dist: multipledispatch (>=0.6.0,<0.7.0)
Requires-Dist: pyrsistent (==0.16.1)
Requires-Dist: python-dateutil (>=2.8.2,<3.0.0)
Requires-Dist: pytz (>=2021.1,<2022.0)
Requires-Dist: requests (>=2.27.1,<3.0.0)
Requires-Dist: rfc3987 (>=1.3.8,<2.0.0)
Requires-Dist: uritemplate (>=3.0.1,<4.0.0)
Project-URL: Repository, https://github.com/ThePalaceProject/webpub-manifest-parser
Description-Content-Type: text/markdown

# webpub manifest parser

[![Run Tests](https://github.com/ThePalaceProject/webpub-manifest-parser/actions/workflows/test.yml/badge.svg)](https://github.com/ThePalaceProject/webpub-manifest-parser/actions/workflows/test.yml)
[![PyPI](https://img.shields.io/pypi/v/palace-webpub-manifest-parser)](https://pypi.org/project/palace-webpub-manifest-parser/)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![Imports: isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336)](https://pycqa.github.io/isort/)
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)
![Python: 3.7,3.8,3.9,3.10](https://img.shields.io/badge/Python-3.7%20%7C%203.8%20%7C%203.9%20%7C%203.10-blue)

A parser for the
[Readium Web Publication Manifest (RWPM)](https://github.com/readium/webpub-manifest),
[Open Publication Distribution System 2.0 (OPDS 2.0)](https://drafts.opds.io/opds-2.0), and
[Open Distribution to Libraries 1.0 (ODL)](https://drafts.opds.io/odl-1.0.html) formats.

## Usage

Install the library with `pip`

```bash
pip install palace-webpub-manifest-parser
```

### Pyenv

You can optionally install the python version to run the library with using pyenv.

1. Install [pyenv](https://github.com/pyenv/pyenv#installation)

2. Install one of the supported Python versions:
    ```bash
    pyenv install <python-version>
    ```

3. Install [pyenv-virtualenv](https://github.com/pyenv/pyenv-virtualenv#installation) plugin

4. Create a virtual environment:
    ```bash
    pyenv virtualenv <virtual-env-name>
    pyenv activate <virtual-env-name>
    ```

5. Install the library
    ```bash
    pip install palace-webpub-manifest-parser
    ```

## Setting up a development environment

### Running tests using tox

1. Make sure that a virtual environment is not activated and deactivate it if needed:
    ```bash
    deactivate
    ```

2. Install `tox` and `tox-pyenv` globally:
    ```bash
    pip install tox tox-pyenv
    ```

3. Make your code prettier using isort and black:
    ```bash
    pre-commit run -a
    ```

4. To run the unit tests use the following command:
    ```bash
    tox -e <python-version>
    ```
    where `<python-version>` is one of supported python versions:
   - py37
   - py38
   - py39
   - py310

    For example, to run the unit test using Python 3.9 run the following command:
    ```bash
    tox -e py39
    ```

## Releasing

Releases will be automatically published to PyPI when new releases are created on github by the
[release.yml](.github/workflows/release.yml) workflow. Just create a release in github with the version
number that you would like to use as the tag, and the rest will happen automatically.

