Metadata-Version: 2.1
Name: pep610
Version: 0.0.1a1
Summary: Python helpers for PEP 610
Project-URL: Documentation, https://github.com/unknown/pep610#readme
Project-URL: Issues, https://github.com/unknown/pep610/issues
Project-URL: Source, https://github.com/unknown/pep610
Author-email: Edgar Ramírez Mondragón <edgarrm358@gmail.com>
License-Expression: Apache-2.0
License-File: LICENSE
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Requires-Python: >=3.8
Provides-Extra: dev
Requires-Dist: hypothesis; extra == 'dev'
Requires-Dist: pytest; extra == 'dev'
Description-Content-Type: text/markdown

# pep610

[![PyPI - Version](https://img.shields.io/pypi/v/pep610.svg)](https://pypi.org/project/pep610)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pep610.svg)](https://pypi.org/project/pep610)

-----

**Table of Contents**

- [Installation](#installation)
- [Usage](#usage)
- [License](#license)

## Installation

```console
pip install pep610
```

## Usage

```python
from importlib import metadata

import pep610

dist = metadata.distribution('pep610')
data = pep610.read_from_distribution(dist)

match data:
    case pep610.DirData(url, dir_info):
        print(f"URL: {url}")
        print(f"Editable: {dir_info.editable}")
    case pep610.VCSData(url, vcs_info):
        print(f"URL: {url}")
        print(f"VCS: {vcs_info.vcs}")
        print(f"Commit: {vcs_info.commit_id}")
    case pep610.ArchiveData(url, archive_info):
        print(f"URL: {url}")
        print(f"Hash: {archive_info.hash}")
    case _:
        print("Unknown data")
```

## License

`pep610` is distributed under the terms of the [Apache License 2.0](LICENSE).
