PEP 610 Direct URL data parser
Project description
pep610
A Python library for parsing the Direct URL Origin structure from installed packages.
PEP 610 initially specified how the Direct URL Origin of installed distributions should be recorded, but the up-to-date, canonical specification is maintained on the PyPA specs page.
Table of Contents
Installation
pip install pep610
Usage
You can use pep610.read_from_distribution to parse the Direct URL Origin structure from a Distribution object:
from importlib import metadata
import pep610
dist = metadata.distribution("pep610")
if (
(data := pep610.read_from_distribution(dist))
and isinstance(data, pep610.DirData)
and data.dir_info.is_editable()
):
print("Editable installation, a.k.a. in development mode")
else:
print("Not an editable installation")
Or, in Python 3.10+ using pattern matching:
from importlib import metadata
import pep610
dist = metadata.distribution("pep610")
match data := pep610.read_from_distribution(dist):
case pep610.DirData(url, pep610.DirInfo(editable=True)):
print("Editable installation, a.k.a. in development mode")
case _:
print("Not an editable installation")
Development
This project uses Tox.
Run all checks with:
tox run-parallel
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pep610-0.5.1.tar.gz.
File metadata
- Download URL: pep610-0.5.1.tar.gz
- Upload date:
- Size: 21.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
843082d0526a1696d83ea25052bd70602d7d2c9226da29eed5df1c553819516e
|
|
| MD5 |
250ccbd342d6744aceb5f943bea99434
|
|
| BLAKE2b-256 |
e58408b3f8e5a52dfd1917c90bf0eda9a26501d894b67bbbecf06c5aa3674ad1
|
Provenance
The following attestation bundles were made for pep610-0.5.1.tar.gz:
Publisher:
release.yaml on edgarrmondragon/pep610
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pep610-0.5.1.tar.gz -
Subject digest:
843082d0526a1696d83ea25052bd70602d7d2c9226da29eed5df1c553819516e - Sigstore transparency entry: 850115096
- Sigstore integration time:
-
Permalink:
edgarrmondragon/pep610@25832808b98ff07c8da40e1845fb6f4b3e58697b -
Branch / Tag:
refs/tags/v0.5.1 - Owner: https://github.com/edgarrmondragon
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@25832808b98ff07c8da40e1845fb6f4b3e58697b -
Trigger Event:
push
-
Statement type:
File details
Details for the file pep610-0.5.1-py3-none-any.whl.
File metadata
- Download URL: pep610-0.5.1-py3-none-any.whl
- Upload date:
- Size: 10.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e92b47df8f2b7fb7f697172ae90b38e81d3decfeea99bb40767fbfabb69cfd57
|
|
| MD5 |
ea580aa2cfe48a30a3d43efd87da5ba7
|
|
| BLAKE2b-256 |
bdfcec46de6a5e69b1b49a2a7805b8540b8efcbd26b2a1614738850ab8126111
|
Provenance
The following attestation bundles were made for pep610-0.5.1-py3-none-any.whl:
Publisher:
release.yaml on edgarrmondragon/pep610
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pep610-0.5.1-py3-none-any.whl -
Subject digest:
e92b47df8f2b7fb7f697172ae90b38e81d3decfeea99bb40767fbfabb69cfd57 - Sigstore transparency entry: 850115097
- Sigstore integration time:
-
Permalink:
edgarrmondragon/pep610@25832808b98ff07c8da40e1845fb6f4b3e58697b -
Branch / Tag:
refs/tags/v0.5.1 - Owner: https://github.com/edgarrmondragon
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@25832808b98ff07c8da40e1845fb6f4b3e58697b -
Trigger Event:
push
-
Statement type: