Skip to main content

eggfetch

CI Crates.io Crates.io Downloads PyPI version PyPI Downloads License

eggfetch is a Rust-native async HTTP client engine (tokio + hyper) with Python bindings and a CLI. There is exactly one networking implementation, living entirely in eggfetch-core; the Python sync API blocks on the async engine while releasing the GIL, and the async API integrates with asyncio.

Features

  • HTTP/1.1, HTTP/2, HTTP/3 — ALPN negotiation; HTTP/3 over QUIC stays experimental (graduation gate)
  • Streaming — request/response bodies without eager buffering (bytes_stream(), text_lines()); trailers via Response::trailers() (guide)
  • Pooling, timeouts, observability — per-origin in-flight limits, phase-aware timeouts (pool/connect/write/read/total), connector/DNS/TLS and H3 transport metrics (pool/timeouts)
  • TLS — rustls with custom CA bundles, mTLS client certs, version policy, verification toggle (TLS)
  • Proxy — HTTP forwarding, HTTPS CONNECT, proxy auth, per-request override, NO_PROXY; SOCKS5 and UDS routes (proxy)
  • Cookies, auth, multipart — RFC 6265 jar, Basic/Bearer with redaction, streaming multipart uploads (cookies)
  • Retries and redirects — policy-driven backoff with Retry-After, replayable-body redirect handling (retry)
  • Compression — feature-gated streaming gzip/brotli/zstd/deflate with zip-bomb limits (compression)
  • Native Rust JSON (opt-in) — replayable RequestBuilder::json(), single-consumption Response::json() via the json feature (guide)
  • Python API — requests/HTTPX-compatible sync and async interfaces (guide), plus versioned eggfetch.compat.httpx (0.28.1) and eggfetch.compat.httpx2 (2.12.0) facades (compatibility)
  • Upgrades — 101 responses expose an owned network_stream (WebSocket/SSE building blocks); CONNECT tunnels stay body-iterator only
  • CLI — streaming output, machine-readable formats, shell completions (guide)
  • C ABI and Node.js prototype — opaque-handle FFI plus an experimental N-API wrapper (ffi-and-node)

Installation

Python:

pip install eggfetch

Rust:

[dependencies]
eggfetch-core = { version = "0.1", features = ["http1", "tls-rustls", "tls-native-roots"] }

See the feature profile matrix for minimal, deterministic, and embedded recipes.

CLI:

cargo install eggfetch-cli

Usage -- Python

import eggfetch

r = eggfetch.get("https://httpbin.org/get")
print(r.status_code)
print(r.text)
import eggfetch

with eggfetch.Client(headers={"User-Agent": "my-app/1.0"}) as client:
    r = client.get("https://httpbin.org/get")
    print(r.json())

    r = client.post("https://httpbin.org/post", json={"key": "value"})
    print(r.status_code)

    with client.stream("GET", "https://httpbin.org/stream-bytes/10000") as r:
        for chunk in r.iter_bytes():
            print(f"chunk: {len(chunk)} bytes")
import asyncio
import eggfetch

async def main():
    async with eggfetch.AsyncClient() as client:
        r = await client.get("https://httpbin.org/get")
        print(r.status_code)

        responses = await asyncio.gather(
            client.get("https://httpbin.org/get"),
            client.get("https://httpbin.org/ip"),
        )
        for resp in responses:
            print(resp.json())

asyncio.run(main())
import eggfetch

client = eggfetch.Client(
    timeout=10.0,
    headers={"User-Agent": "my-app/1.0"},
    limits=eggfetch.Limits(max_connections=100),
    verify="/path/to/ca-bundle.pem",        # custom CA bundle
    cert=("/path/to/cert.pem", "/path/to/key.pem"),  # mTLS
    proxy="http://proxy:8080",
    http2=True,
)

Versioned HTTPX-compatible facades over the same engine:

from eggfetch.compat.httpx import Client  # HTTPX 0.28.1 surface
from eggfetch.compat.httpx2 import Client as H2Client  # httpx2 2.12.0 surface

See docs/python/guide.md for the full Python API reference.

Usage -- Rust

use eggfetch_core::Client;
use futures_util::StreamExt;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = Client::builder()
        .timeout(eggfetch_core::Timeout::from_secs(30))
        .follow_redirects(true)
        .user_agent("my-app/1.0")
        .build();

    let mut resp = client.get("https://httpbin.org/get").send().await?;
    println!("Status: {}", resp.status());
    println!("Body: {}", resp.text().await?);

    // Streaming body
    let mut resp = client.get("https://httpbin.org/stream/3").send().await?;
    let mut stream = resp.bytes_stream()?;
    while let Some(chunk) = stream.next().await {
        println!("chunk: {} bytes", chunk?.len());
    }

    Ok(())
}

The opt-in json feature adds RequestBuilder::json() / Response::json() Serde helpers, and resolved_addresses() pins caller-validated destinations without a second DNS lookup. See docs/rust/guide.md for the full Rust API reference.

Usage -- CLI

# GET request
eggfetch https://httpbin.org/get

# POST JSON
eggfetch -X POST https://httpbin.org/post --json '{"key": "value"}'

# With authentication
eggfetch --auth user:pass https://httpbin.org/basic-auth/user/pass

# Streaming download
eggfetch --output file.bin https://httpbin.org/stream-bytes/10000

# Machine-readable output
eggfetch --json-output https://httpbin.org/get

See docs/cli/guide.md for the full CLI reference.

Examples

Runnable starting points (each takes an optional base URL argument, default https://httpbin.org):

More patterns are in docs/cookbook/.

HTTPX Compatibility

Two versioned, independent facades over the single Rust engine — eggfetch.compat.httpx (0.28.1) and eggfetch.compat.httpx2 (2.12.0, adds FunctionAuth, Origin/URL.origin, QUERY, SSE, optional WebSocket). Both are Stage C qualified on frozen executable SHA 22a6f5c0dc0207c1356b6143c0eda3d4075063b0; HTTPX 1.0 preview under compat/httpx/1.0-preview/ is reconnaissance only.

See docs/reference/compatibility.md for the full feature matrix and retained differences.

Documentation

Section Description
getting-started/ Installation and quickstart guide
concepts/ Architecture, lifecycle, timeouts, streaming, cookies, auth, proxy, TLS
rust/guide.md Rust API guide with examples
python/guide.md Python sync/async API guide
cli/guide.md CLI reference and usage guide
migration/ Migration guides from requests and HTTPX
cookbook/ Practical runnable examples
reference/ Compatibility matrix, feature matrix, error reference
security/ Security guidelines and troubleshooting
architecture/ Internal architecture documentation
ffi/ C ABI and FFI binding guide

Security

  • Dependency auditing: cargo-deny configured in deny.toml
  • Secret redaction: all Debug/Display/error output redacts credentials, cookies, bearer tokens, and proxy passwords
  • Threat model: see docs/architecture/threat-model.md
  • Vulnerability reporting: see SECURITY.md

License

eggfetch is licensed under the MIT License.

MSRV

The minimum supported Rust version is 1.80, declared in workspace.package.rust-version and checked in extended validation. rust-toolchain.toml pins the stable channel for development.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

eggfetch-0.1.4.tar.gz (661.5 kB view details)

Uploaded Source

Built Distributions

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

eggfetch-0.1.4-cp313-cp313-win_amd64.whl (3.9 MB view details)

Uploaded CPython 3.13Windows x86-64

eggfetch-0.1.4-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.2 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

eggfetch-0.1.4-cp313-cp313-macosx_11_0_arm64.whl (3.8 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

eggfetch-0.1.4-cp312-cp312-win_amd64.whl (3.9 MB view details)

Uploaded CPython 3.12Windows x86-64

eggfetch-0.1.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.2 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

eggfetch-0.1.4-cp312-cp312-macosx_11_0_arm64.whl (3.8 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

eggfetch-0.1.4-cp311-cp311-win_amd64.whl (3.9 MB view details)

Uploaded CPython 3.11Windows x86-64

eggfetch-0.1.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.2 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

eggfetch-0.1.4-cp311-cp311-macosx_11_0_arm64.whl (3.8 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

eggfetch-0.1.4-cp310-cp310-win_amd64.whl (3.9 MB view details)

Uploaded CPython 3.10Windows x86-64

eggfetch-0.1.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.2 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

eggfetch-0.1.4-cp310-cp310-macosx_11_0_arm64.whl (3.8 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

Details for the file eggfetch-0.1.4.tar.gz.

File metadata

  • Download URL: eggfetch-0.1.4.tar.gz
  • Upload date:
  • Size: 661.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for eggfetch-0.1.4.tar.gz
Algorithm Hash digest
SHA256 f1286f8e32b7cb682f020e3e7173269d3f8b2d4a088f3bad0cd6cdcd8a4c7de9
MD5 37543fd22218ef04c033eb8cc296eeff
BLAKE2b-256 e8d9a926d9060823c13df049ea0f556fa2c1691bba3f758b5fbc412f8658514b

See more details on using hashes here.

Provenance

The following attestation bundles were made for eggfetch-0.1.4.tar.gz:

Publisher: pypi.yml on eggstack/eggfetch

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file eggfetch-0.1.4-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: eggfetch-0.1.4-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 3.9 MB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for eggfetch-0.1.4-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 6b9d0555e6f85ba0a49fbe4c4dc8dccfa5155b64ee0aeee09c33c5dda358c27c
MD5 febd55dcb3ddd2dc38553f8b584ea813
BLAKE2b-256 07e0cce2ecbcaaeab07097378fbe3f5c8c2482281d184cca3622ebfce17db177

See more details on using hashes here.

Provenance

The following attestation bundles were made for eggfetch-0.1.4-cp313-cp313-win_amd64.whl:

Publisher: pypi.yml on eggstack/eggfetch

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file eggfetch-0.1.4-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for eggfetch-0.1.4-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7dc33c94805e032cab03196da14be0305be90023c636db9b30e29ccf715e21b0
MD5 03b84537a2d5f608caebe61b7771a533
BLAKE2b-256 f7c542b9f647f675481f5ef09cf6c83119fad6d516eaee440da2786f4e08f1bb

See more details on using hashes here.

Provenance

The following attestation bundles were made for eggfetch-0.1.4-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: pypi.yml on eggstack/eggfetch

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file eggfetch-0.1.4-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for eggfetch-0.1.4-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 eb6d0475d8cf49e51b56aab50a40fcfe5d19b1e7eccd10a92c1aea02ba4aa028
MD5 7063bb7e77ff60283c7999006e882395
BLAKE2b-256 fe51fd736d90e681650570899c9e8e96517d2b4b4e713fe5885266242156ec20

See more details on using hashes here.

Provenance

The following attestation bundles were made for eggfetch-0.1.4-cp313-cp313-macosx_11_0_arm64.whl:

Publisher: pypi.yml on eggstack/eggfetch

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file eggfetch-0.1.4-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: eggfetch-0.1.4-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 3.9 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for eggfetch-0.1.4-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 d5c8193ef3d1a9a237167c983148111155352b2110edd1498d3c62a8ba3bf468
MD5 f4fac4fbd3853106dee4bfde35e75cf6
BLAKE2b-256 91e819c99478b044e465077e6e78d70750f5b32d0b85ff6e47b1bdd528828e02

See more details on using hashes here.

Provenance

The following attestation bundles were made for eggfetch-0.1.4-cp312-cp312-win_amd64.whl:

Publisher: pypi.yml on eggstack/eggfetch

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file eggfetch-0.1.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for eggfetch-0.1.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 bb9dbff27181ccef32385238f5c167161726f841eabec2ec5018d37f3abf5735
MD5 3ee8e93ef6e5bd3aa1854d99b0051490
BLAKE2b-256 85a757b7569d659908791faba09ee6999ad79dd258657561e89adac72a002d7f

See more details on using hashes here.

Provenance

The following attestation bundles were made for eggfetch-0.1.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: pypi.yml on eggstack/eggfetch

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file eggfetch-0.1.4-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for eggfetch-0.1.4-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 759824080a9d6126300844fb01b1ccd278970235f72467f3103e92b429037e0c
MD5 ea0492eda42dc11b25fe97087478817d
BLAKE2b-256 efcf2061dad2ce3909d30147e9e2dc3126742dc7a73ece53fb60b81b60ce4c3f

See more details on using hashes here.

Provenance

The following attestation bundles were made for eggfetch-0.1.4-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: pypi.yml on eggstack/eggfetch

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file eggfetch-0.1.4-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: eggfetch-0.1.4-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 3.9 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for eggfetch-0.1.4-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 435bce4b83337868e18eb3e7d62ca3a7c58fd5e26a0a38d442787fc11bcd8a89
MD5 4e0294ac17c496963e4bd7b080537048
BLAKE2b-256 877aee36be9603e76fbb22751b872ae3e0a331ac12dda4437da0b219f00435c3

See more details on using hashes here.

Provenance

The following attestation bundles were made for eggfetch-0.1.4-cp311-cp311-win_amd64.whl:

Publisher: pypi.yml on eggstack/eggfetch

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file eggfetch-0.1.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for eggfetch-0.1.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 cc8e37e9865d122166838eaffad98ec2281117275bcdb10e8c8f1d5e5a970f4c
MD5 878e45b06261aa60965f93b98d0c6ac2
BLAKE2b-256 09cd94a0b83949605c158d3a54194c0598cb6dfd9b4381e19efd096d02471180

See more details on using hashes here.

Provenance

The following attestation bundles were made for eggfetch-0.1.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: pypi.yml on eggstack/eggfetch

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file eggfetch-0.1.4-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for eggfetch-0.1.4-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c4ac99c6e940e20e4bf0ddde4b4f87b337fe2ba9314a6eb0e68834c101b35284
MD5 0b82e38eed46f46b34cbb642fcc50156
BLAKE2b-256 e070392c3639d27badaaf7a2d759444c7ad85e4481895a21ac8722f082920e6e

See more details on using hashes here.

Provenance

The following attestation bundles were made for eggfetch-0.1.4-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: pypi.yml on eggstack/eggfetch

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file eggfetch-0.1.4-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: eggfetch-0.1.4-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 3.9 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for eggfetch-0.1.4-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 0e1b0ed9b10ce94e20ad70342aa95e87beb485325310f4975065496b9fa7205d
MD5 057a6e0cceadcdca135a1c08c0f66f3a
BLAKE2b-256 3b204ca485264d908b0eb6f4593655196ab75ffa5d143bee7edda6674ffd43ea

See more details on using hashes here.

Provenance

The following attestation bundles were made for eggfetch-0.1.4-cp310-cp310-win_amd64.whl:

Publisher: pypi.yml on eggstack/eggfetch

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file eggfetch-0.1.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for eggfetch-0.1.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5ae24cb02192db103e60d61b3f703ad35a3d47735380cff3d28d010b94637471
MD5 c93325cabc9f7d3639999cc3455d15ac
BLAKE2b-256 8437c41181742776028d40e4dc75529dcfac267828f8f3b4e232224fb0eca8b1

See more details on using hashes here.

Provenance

The following attestation bundles were made for eggfetch-0.1.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: pypi.yml on eggstack/eggfetch

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file eggfetch-0.1.4-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for eggfetch-0.1.4-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5b1d3b04cd0aeb544707be31b89cb1bcae6c350799c3ce58baa9c9fd7deb24ad
MD5 39a340592bcb76b72db03623816f8fba
BLAKE2b-256 3e94b63136ae1e4eb9b6d3cc4bb2b9123f5bbfb2512cf7250460dda43a338eef

See more details on using hashes here.

Provenance

The following attestation bundles were made for eggfetch-0.1.4-cp310-cp310-macosx_11_0_arm64.whl:

Publisher: pypi.yml on eggstack/eggfetch

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.1.4 This release

13 files

0.1.3

13 files

0.1.1

13 files

0.1.0

13 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page