Skip to main content

Pooch downloader powered by Rattler

Project description

pooch-rattler

GitHub Actions Workflow Status PyPI - Version PyPI - Python Version BSD-3-Clause License
basedpyright pyrefly ty Ruff uv Pixi

Pooch downloader powered by Rattler.

Features

  • Native Rust performance
  • Work with anyio, asyncio and trio
  • Drop-in replacement of the global default Pooch downloader
  • Reqwest middlewares which bring the missing GCS, S3 and retry support in Pooch

Get started

import anyio.to_thread
import pooch
import pooch_rattler

# Register global default
pooch_rattler.install()

# Synchronous download
downloaded_file = pooch.retrieve("https://example.com/index.html")

# Asynchronous download
async def async_download():
    # We still need a worker thread to look for existing cache,
    # validate checksums and decompress downloaded files
    return await anyio.to_thread.run_sync(
        pooch.retrieve, "https://example.com/index.html")

cached_file = anyio.run(async_download)
assert cached_file == downloaded_file

Downloaders can also be created and invoked explicitly. Examples can be found in the unit tests.

Resumable downloader

Resumable downloader provides functionality like curl -C - (man page). It's not the default behavior due to the following limitations:

  • The server must know how to handle HTTP range requests, otherwise the downloaded file can be corrupted since there is no way to read response headers into Python from Rattler.
  • Resumable downloader also introduces slightly more Python overhead even if no actual resumption takes place.

Resumable downloader supports most of the features described in the previous sections. To use it, replace your pooch_rattler.Downloader with pooch_rattler.ResumableDownloader.

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

pooch_rattler-0.3.0.tar.gz (6.1 kB view details)

Uploaded Source

Built Distribution

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

pooch_rattler-0.3.0-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file pooch_rattler-0.3.0.tar.gz.

File metadata

  • Download URL: pooch_rattler-0.3.0.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.17 {"installer":{"name":"uv","version":"0.11.17","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 pooch_rattler-0.3.0.tar.gz
Algorithm Hash digest
SHA256 fac9150804fefd5bf36bf2c4635be4bd2599c20858a6448cc243931786492a68
MD5 06f2c2af2f1aa7df6ee1ce8bc1536dd0
BLAKE2b-256 ba4eff348c76e1752bb45396b3e098884b8ec3d2fb94fb5e1772dffaf4cf28a5

See more details on using hashes here.

Provenance

The following attestation bundles were made for pooch_rattler-0.3.0.tar.gz:

Publisher: publish-pypi.yml on hingebase/pooch-rattler

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

File details

Details for the file pooch_rattler-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: pooch_rattler-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 7.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.17 {"installer":{"name":"uv","version":"0.11.17","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 pooch_rattler-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 496a77f6b04efa4c715986442f0c45f808928310c231f4091aa082d886cfc411
MD5 358dea272baf27230c01cf586543b381
BLAKE2b-256 2346dde5060a13e35664a59263d38516eb630229f8d879bea15c5ade001681cd

See more details on using hashes here.

Provenance

The following attestation bundles were made for pooch_rattler-0.3.0-py3-none-any.whl:

Publisher: publish-pypi.yml on hingebase/pooch-rattler

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

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