Skip to main content

Python helpers for PEP 610

Project description

pep610

PyPI - Version PyPI - Python Version


Table of Contents

Installation

pip install pep610

Usage

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pep610-0.0.1a1.tar.gz (12.2 kB view hashes)

Uploaded Source

Built Distribution

pep610-0.0.1a1-py3-none-any.whl (7.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page