Skip to main content

Protocol-level client SDK for fetchurl content-addressable cache servers

Project description

fetchurl Python SDK

Protocol-level client for fetchurl content-addressable cache servers.

Zero runtime dependencies — uses only the Python standard library. Works with any HTTP library via Fetcher / AsyncFetcher protocols.

Install

pip install fetchurl-sdk
# or
uv add fetchurl-sdk

Protocol

Normative behavior: fetchurl/spec (SPEC.md).

Reference server: fetchurl/fetchurl.

Usage

from fetchurl import fetch, UrllibFetcher, parse_fetchurl_server
import os

servers = parse_fetchurl_server(os.environ.get("FETCHURL_SERVER", ""))
# Or drive FetchSession yourself with your HTTP client — see package docstring.

Clients must treat the server as untrusted and verify the hash (this SDK does that for you).

Environment

Variable Meaning
FETCHURL_SERVER Server base URL(s) per the spec. Empty/absent disables server use.

Development

uv sync --dev
uv run python -m unittest test_fetchurl.py
# Integration (Docker + image):
# FETCHURL_TEST_IMAGE=fetchurl:local uv run --extra test python -m unittest test_fetchurl_integration.py

Related

Repo Role
fetchurl/spec Protocol
fetchurl/fetchurl Go server
fetchurl/sdk-js JavaScript SDK
fetchurl/sdk-rust Rust SDK

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

fetchurl_sdk-0.2.1.tar.gz (48.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fetchurl_sdk-0.2.1-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file fetchurl_sdk-0.2.1.tar.gz.

File metadata

  • Download URL: fetchurl_sdk-0.2.1.tar.gz
  • Upload date:
  • Size: 48.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for fetchurl_sdk-0.2.1.tar.gz
Algorithm Hash digest
SHA256 120d8287a343372f7985eabd87b877a8ba4125466cae90fb5c7a60067633f485
MD5 a68819be929b60f3a7144511aefcd00c
BLAKE2b-256 060acd15b97c7fa558f44cd2f465d35bcc1d3f8b77f3e10382aa70390ef40921

See more details on using hashes here.

File details

Details for the file fetchurl_sdk-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: fetchurl_sdk-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 6.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for fetchurl_sdk-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9caed99bb3115d743ae0bec6402424e34de787ac88e9c8f43418ec17ff7dc606
MD5 fc873eff921af410e87041b903bce43d
BLAKE2b-256 6fca1a520600d536d015929efe85117893368d99aa510b9f1b8b15afca0e2a08

See more details on using hashes here.

Supported by

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