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

Uploaded Python 3

File details

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

File metadata

  • Download URL: pooch_rattler-0.3.2.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","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.2.tar.gz
Algorithm Hash digest
SHA256 edeb2eee50ce308bd2f8839a68433497633b7971e80eb4bcb34f726fb965dbbc
MD5 ebbef7d6fcdd097482e74b7f349474ed
BLAKE2b-256 ff74db5bce3ee571a6077bb95fadee26cdb955cf3a2a9a2a4dce719320e628f3

See more details on using hashes here.

Provenance

The following attestation bundles were made for pooch_rattler-0.3.2.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.2-py3-none-any.whl.

File metadata

  • Download URL: pooch_rattler-0.3.2-py3-none-any.whl
  • Upload date:
  • Size: 7.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 05e1b9e1502585e642fa451ef2ce97c03086fd40f77922f1f22f931bce839399
MD5 ac4f8df63898c01598be28872113e2e2
BLAKE2b-256 7f3c03b3b2b8c035ac4264dc98402a5df20d6110fbba2b84dc28efa170cd721a

See more details on using hashes here.

Provenance

The following attestation bundles were made for pooch_rattler-0.3.2-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