Skip to main content

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

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.2.tar.gz (50.3 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.2-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: fetchurl_sdk-0.2.2.tar.gz
  • Upload date:
  • Size: 50.3 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.2.tar.gz
Algorithm Hash digest
SHA256 d7eca4912aa84802e2d0368efb5dfd81fee161d236e3b766af79e53e6a42c0f7
MD5 ff1065537ad751b3610ba30a2c0cd89d
BLAKE2b-256 e006d00ea9b5d378363f6c1d337d70b3a14b462113a0c34c395ef00a858c8f1c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fetchurl_sdk-0.2.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 bc6507cb46cd322de3fbf206cf5503f4fcee1928375fee5b978b0f76a7da4610
MD5 8d3671b851b2e525e3b059eac9891a42
BLAKE2b-256 fcd50061f9b3bb87aeddceaeb6db890d2be5159ee2cc4fbff8bdc5cfcd29e24c

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.2.2 This release

2 files

0.2.1

2 files

0.2.0

2 files

0.1.6

2 files

0.1.5

2 files

0.1.4

2 files

Supported by

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