Resolver and install-record boundary for install-centric Python package runtimes
Project description
zab-pkg-resolve
zab-pkg-resolve is a small resolver and install-record boundary for Python package runtimes. It keeps source lookup, target normalization, cache/install state, validation, and consumer-facing package records outside the runtime that loads and dispatches installed packages.
The first consumer is zush, but the package is intentionally runtime-agnostic: it records what was resolved and installed, then projects a compact record that another runtime can use to load the package surface.
Install
pip install zab-pkg-resolve
Python 3.12 or newer is required.
What It Provides
- Canonical target normalization for package references such as GitHub shorthand and explicit URLs.
- Source/provider registration through
ResolverRegistryandSourceProviderimplementations. - Managed cache and install records through
ManagedStore. - Runtime-facing
ConsumerPackageRecordprojection without resolver credentials or registry internals. - Structured
Loadpointvalues for module and path based package surfaces. InstallResult.changedso consumers can skip runtime reloads when an update did not change the active artifact or load surface.- Validation policies for manifest fields and Python version constraints.
Basic Usage
from pathlib import Path
from zab_pkg_resolve import CanonicalTarget, Loadpoint, ManagedStore, ResolvedPackage
store = ManagedStore(Path(".zab"))
package = ResolvedPackage(
id="zush.cron",
target=CanonicalTarget("package", "zush.cron"),
artifact_hash="abc123",
loadpoint=Loadpoint.module("zush_cron.__zush__", callable="extension"),
capabilities=["zush.extension"],
)
result = store.install(package)
if result.changed:
for record in store.consumer_records():
print(record.as_dict())
Loadpoints
A loadpoint tells a consumer runtime where the installed package surface lives and which callable to execute.
Loadpoint.module("package_name.__zush__", callable="extension")
Loadpoint.path("C:/workspace/package_name", callable="extension")
Consumers receive loadpoints through ConsumerPackageRecord.as_dict():
{
"id": "zush.cron",
"installed_path": ".zab/installed/zush.cron",
"entrypoint": None,
"loadpoint": {
"kind": "module",
"ref": "zush_cron.__zush__",
"callable": "extension",
},
"capabilities": ["zush.extension"],
}
Development
uv run --extra dev behave
uv run python -m unittest discover -s tests
uv build
License
MIT
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 zab_pkg_resolve-0.1.0.tar.gz.
File metadata
- Download URL: zab_pkg_resolve-0.1.0.tar.gz
- Upload date:
- Size: 7.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
298ac8ba75261decacd115e7b7e6adc576229a5e0e080c45fe746ce6f7e3c212
|
|
| MD5 |
86eecb3f6e27acad2d658f57b2d2c047
|
|
| BLAKE2b-256 |
19e1ef7f8bec09d2405e92aad5f3b3994a8c39a9a13677a924a0b99130a59bac
|
Provenance
The following attestation bundles were made for zab_pkg_resolve-0.1.0.tar.gz:
Publisher:
publish.yml on ZackaryW/zab-pkg-resolve
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
zab_pkg_resolve-0.1.0.tar.gz -
Subject digest:
298ac8ba75261decacd115e7b7e6adc576229a5e0e080c45fe746ce6f7e3c212 - Sigstore transparency entry: 1684269763
- Sigstore integration time:
-
Permalink:
ZackaryW/zab-pkg-resolve@e035b79c603d6bfebec204ef95a7fa9ca86ba71f -
Branch / Tag:
refs/heads/main - Owner: https://github.com/ZackaryW
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@e035b79c603d6bfebec204ef95a7fa9ca86ba71f -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file zab_pkg_resolve-0.1.0-py3-none-any.whl.
File metadata
- Download URL: zab_pkg_resolve-0.1.0-py3-none-any.whl
- Upload date:
- Size: 13.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5e97f23f4a68ff68f8b78aa2c9c9015f577b8c0a7163454f5cb5ed671ac0c649
|
|
| MD5 |
a7ce35b32ddd08a493713495291f6fc3
|
|
| BLAKE2b-256 |
95ed8a2e1bb106b4ae012ec82012db6efb32e15c1281b3ed9243564bbcdab874
|
Provenance
The following attestation bundles were made for zab_pkg_resolve-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on ZackaryW/zab-pkg-resolve
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
zab_pkg_resolve-0.1.0-py3-none-any.whl -
Subject digest:
5e97f23f4a68ff68f8b78aa2c9c9015f577b8c0a7163454f5cb5ed671ac0c649 - Sigstore transparency entry: 1684270933
- Sigstore integration time:
-
Permalink:
ZackaryW/zab-pkg-resolve@e035b79c603d6bfebec204ef95a7fa9ca86ba71f -
Branch / Tag:
refs/heads/main - Owner: https://github.com/ZackaryW
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@e035b79c603d6bfebec204ef95a7fa9ca86ba71f -
Trigger Event:
workflow_dispatch
-
Statement type: