Python helpers for PEP 610
Project description
pep610
PEP 610 specifies how the Direct URL Origin of installed distributions should be recorded.
The up-to-date, canonical specification is maintained on the PyPA specs page.
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
Release history Release notifications | RSS feed
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.1a2.tar.gz
(13.3 kB
view hashes)
Built Distribution
pep610-0.0.1a2-py3-none-any.whl
(11.3 kB
view hashes)