Skip to main content

ReliaDL: Production-Grade Resilient Download Engine

PyPI - Version PyPI - Python Version License: Apache 2.0 CodeQL Security Analysis OpenSSF Scorecard OpenSSF Best Practices

ReliaDL is a production-grade, fault-tolerant parallel file download framework and high-throughput streaming engine. Designed for high-reliability data pipelines, enterprise infrastructure, and non-stationary channels, ReliaDL combines stochastic network optimization, per-chunk cryptographic integrity verification, corporate proxy tunneling, async rate limiting, and Prometheus observability.

PyPI Package | Documentation | Release Notes | RFC Roadmap | Issue Tracker


Key Capabilities

Feature Description Architecture Component
Cryptographic Integrity Per-chunk SHA-256 validation, homomorphic LtHash aggregation, and 4 KB Merkle tree segment localization src.hash_verifier
Proxy Tunneling SOCKS5 (RFC 1928 / 1929) and HTTP CONNECT corporate proxy tunneling with destination-based TLS verification src.adapters.proxy_adapter
Traffic Pacing Token Bucket rate limiter with single-threaded reservation scheduling preventing thundering herd spikes src.rate_limiter
Observability Native Prometheus metrics catalog exporter and structured JSON logging engine src.telemetry & src.logger
Stochastic Pacing Lyapunov-based dynamic chunk sizing (AdaChunk) and restless multi-armed bandit (Whittle index) scheduling src.algorithms
Cloud Adapters Plug-and-play streaming adapters for AWS S3, Google Cloud Storage (GCS), and Azure Blob Storage src.adapters

Installation

From PyPI (Recommended)

pip install reliadl

From Source

git clone https://github.com/PxA-Labs/ReliaDL.git
cd ReliaDL
pip install -e .

Quick Start & Python SDK

1. Basic File Download & Resume Engine

import asyncio
from src.state_manager import StateManager

# Initialize resilient transfer state
state_mgr = StateManager(target_path="./downloads/large_dataset.tar.gz")
print(f"Transfer state initialized: {state_mgr}")

2. Corporate Proxy Tunneling (SOCKS5 & HTTP CONNECT)

from src.adapters.proxy_adapter import ProxyConfig, ProxyType, ProxyTunnel

# Configure SOCKS5 proxy with remote DNS resolution
proxy_config = ProxyConfig(
    proxy_type=ProxyType.SOCKS5H,
    host="proxy.corp.internal",
    port=1080,
    username="service_account",
    password="secure_password"
)

# Open secure tunnel to destination endpoint
tunnel = ProxyTunnel(proxy_config, timeout=30.0)
connection = tunnel.open("secure.example.com", 443)

3. Bandwidth Rate Limiting (Token Bucket)

import asyncio
from src.rate_limiter import TokenBucketRateLimiter

async def main():
    # Throttle transfer rate to 10 MB/s with a 2 MB burst capacity
    limiter = TokenBucketRateLimiter(rate=10 * 1024 * 1024, capacity=2 * 1024 * 1024)
    
    # Compute and acquire bandwidth delay before downloading next chunk
    delay = await limiter.acquire(64 * 1024)
    print(f"Paced chunk delay: {delay:.4f} seconds")

asyncio.run(main())

4. Prometheus Telemetry Monitoring

from src.telemetry.metrics import DownloadMetrics, MetricsRegistry, MetricsServer

registry = MetricsRegistry()
metrics = DownloadMetrics(registry)

# Record chunk transfer telemetry
metrics.record_chunk(bytes_count=65536, duration_seconds=0.012, mirror="us-east-1")

# Launch background HTTP metrics server for Prometheus scrapers on port 9090
with MetricsServer(registry, port=9090) as server:
    print("Prometheus scraper active at http://localhost:9090/metrics")

5. Cryptographic Stream Hash Verification

from src.hash_verifier import StreamingHashVerifier, constant_time_compare

# Initialize streaming SHA-256 verifier
verifier = StreamingHashVerifier(algorithm="sha256")
verifier.update(b"chunk byte payload data...")

# Compute digest and compare in constant time
digest = verifier.hexdigest()
is_valid = constant_time_compare(digest, "b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9")
print(f"Payload valid: {is_valid}")

Command Line Interface (CLI)

ReliaDL includes a CLI for automated background file transfers and file verification:

# Execute a parallel download with adaptive chunking
python -m src.main download \
  --url "https://example.com/dataset.tar.gz" \
  --output "./downloads/dataset.tar.gz" \
  --adachunk \
  --whittle

# Resume an interrupted file transfer
python -m src.main resume \
  --state-file "./downloads/.reliadl/dataset.tar.gz.state"

# Verify payload integrity against expected SHA-256 digest
python -m src.main verify \
  --file "./downloads/dataset.tar.gz" \
  --expected-hash "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"

System Architecture

graph TB
    subgraph ClientLayer["1. Client & Configuration Layer"]
        CLI["CLI Interface (src.main)"]
        CONF["Configuration Engine (src.config)"]
        SM["ACID State Persistence (src.state_manager)"]
    end

    subgraph ControlLayer["2. Optimization & Network Layer"]
        AC["AdaChunk Optimizer (src.algorithms.adaptive_chunker)"]
        RL["Token Bucket Rate Limiter (src.rate_limiter)"]
        PA["Proxy Tunnel Adapter (src.adapters.proxy_adapter)"]
    end

    subgraph TransportLayer["3. Transport Engine & Worker Pool"]
        DE["Download Engine (src.download_engine)"]
        W1["Worker 1 (HTTP/2 Range GET)"]
        W2["Worker 2 (HTTP/2 Range GET)"]
        WN["Worker K (HTTP/2 Range GET)"]
    end

    subgraph SecurityLayer["4. Cryptographic Verification & Observability"]
        DH["Dual Hasher (src.hash_verifier)"]
        ML["Sub-Chunk Merkle Localizer"]
        TEL["Prometheus Metrics Server (src.telemetry)"]
    end

    subgraph StorageLayer["5. Zero-Copy Positional IO"]
        FA["Positional Disk Writer (src.file_assembler)"]
        OUT["Target Payload Artifact"]
    end

    CLI --> CONF
    CLI --> DE
    DE <--> SM
    DE --> AC
    DE --> RL
    DE --> PA
    PA --> W1 & W2 & WN
    W1 & W2 & WN --> DH
    DH --> TEL
    DH --> ML
    DH --> FA
    FA --> OUT

Repository & Module Structure

ReliaDL/
├── README.md                          # Project documentation entry point
├── pyproject.toml                     # PEP 517/518 PyPI build configuration
├── LICENSE                            # Apache 2.0 License
├── requirements.txt                   # Dependency manifests
│
├── .github/
│   ├── dependabot.yml                 # Automated weekly security updates
│   └── workflows/
│       ├── codeql.yml                 # CodeQL static security analysis
│       ├── ci.yml                     # Continuous integration test matrix
│       └── publish.yml                # PyPI Trusted Publisher (OIDC) workflow
│
├── docs/                              # Architecture documentation & research specifications
│   ├── NOVEL_ALGORITHMS.md            # Formal mathematical formulations & proofs
│   ├── ARCHITECTURE.md                # System design trade-offs
│   ├── API_REFERENCE.md               # API documentation
│   └── OBSERVABILITY.md               # Prometheus telemetry guide
│
├── src/                               # Core engine modules
│   ├── adapters/                      # Transport & proxy adapters
│   │   ├── proxy_adapter.py           # SOCKS5 & HTTP CONNECT corporate tunneling
│   │   ├── s3_adapter.py              # AWS S3 cloud adapter
│   │   ├── gcs_adapter.py             # Google Cloud Storage adapter
│   │   └── azure_adapter.py           # Azure Blob Storage adapter
│   ├── algorithms/                    # Stochastic optimization algorithms
│   │   ├── adaptive_chunker.py        # AdaChunk Lyapunov optimizer
│   │   ├── metrics_collector.py       # EWMA network estimator
│   │   ├── mirror_bandit.py           # Whittle index bandit scheduler
│   │   └── work_stealer.py            # Dynamic work stealing queue
│   ├── hash_verifier.py               # Streaming SHA-256 & LtHash verifier
│   ├── rate_limiter.py                # Token bucket bandwidth rate limiter
│   ├── telemetry/                     # Prometheus telemetry & exporter
│   ├── state_manager.py               # Atomic state file manager
│   ├── file_assembler.py              # Zero-copy positional disk assembler
│   ├── config.py                      # System configuration parser
│   ├── exceptions.py                  # Custom taxonomy exceptions
│   └── main.py                        # Command Line Interface (CLI)
│
└── tests/                             # Automated test suite (860+ tests passing)
    └── unit/                          # Component unit tests

Security, Governance & Compliance

ReliaDL adheres to strict enterprise security standards and the Open Source Security Foundation (OpenSSF) guidelines:

  • CodeQL Static Security Analysis: Continuous automated scanning for security vulnerabilities on every push and pull request.
  • Dependabot Vulnerability Management: Weekly automated dependency updates for pip packages and GitHub Actions.
  • PyPI Trusted Publisher (OIDC): Tokenless, passwordless release publishing using OpenID Connect and GitHub Artifact Attestations.
  • Cryptographic Supply Chain Verification: SHA-256 digest validation and signed manifest catalogs preventing payload tampering.
  • Vulnerability Reporting: Coordinated security disclosure policy detailed in SECURITY.md.

Distribution RFC & Multi-Phase Roadmap

ReliaDL is executing a multi-phase distribution roadmap discussed in RFC Discussion #83:


Research Reference

If you use ReliaDL in academic research or production system studies, please cite:

@article{reliadl2026,
  title={{ReliaDL: Adaptive Fault-Tolerant Chunked Transfer with Homomorphic Verification and Stochastic Scheduling}},
  author={Joshi, Purvansh and Mittal, Archit},
  journal={arXiv preprint arXiv:2608.xxxxx},
  year={2026},
  publisher={PxA Labs},
  url={https://github.com/PxA-Labs/ReliaDL}
}

License

ReliaDL is open-source software licensed under the Apache License 2.0.

Download files

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

Source Distribution

reliadl-0.2.0.tar.gz (131.6 kB view details)

Uploaded Source

Built Distribution

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

reliadl-0.2.0-py3-none-any.whl (145.9 kB view details)

Uploaded Python 3

File details

Details for the file reliadl-0.2.0.tar.gz.

File metadata

  • Download URL: reliadl-0.2.0.tar.gz
  • Upload date:
  • Size: 131.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for reliadl-0.2.0.tar.gz
Algorithm Hash digest
SHA256 92b58a41d7305af8285ff10c2fbc67d7ad864d4854c985dc9b396eaa028f379b
MD5 500925323310b73583ef567f7f8787f2
BLAKE2b-256 2e279e258b25b982e07c55601d11861b10146eeafa480e0416662ad401347482

See more details on using hashes here.

Provenance

The following attestation bundles were made for reliadl-0.2.0.tar.gz:

Publisher: publish.yml on PxA-Labs/ReliaDL

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

File details

Details for the file reliadl-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: reliadl-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 145.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for reliadl-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 aea2bc04fdd8c6eb2569e69b872bae8a71691898ff513e47dafeb0ed9a94b5a5
MD5 9e06f9660d6107168c03a4a63b75f62c
BLAKE2b-256 82c8ca0b27ec75d096a7b7f9524d1ca6a712863b5d19d22e3a8ca8097aad4cac

See more details on using hashes here.

Provenance

The following attestation bundles were made for reliadl-0.2.0-py3-none-any.whl:

Publisher: publish.yml on PxA-Labs/ReliaDL

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

Release history Release notifications | RSS feed

0.2.1

2 files

This release

0.2.0 This release

2 files

0.1.0

2 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