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.1.tar.gz (6.2 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.1-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pooch_rattler-0.3.1.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","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.1.tar.gz
Algorithm Hash digest
SHA256 8d09a499f30617700acbd8399c0cd83556f46309dc2906f03a4e1b2865ef3cf0
MD5 5d95abea38f6e035c1ded71dfc8e9b04
BLAKE2b-256 b57dc883e5fcc63805cff86f2d34925daad385c8bbf10cc063978002aa2fa7b1

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: pooch_rattler-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 7.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 db49cc87c63cdbf3a63492113ea930cd8fd3b5123f997bc2f5e8a991252bac38
MD5 62280de2245d8cc1c58b1f0426c647aa
BLAKE2b-256 d7af88cdf1d6b084dd0ff817bbe65a80e36552bcab8d9ede857d602faf8bc106

See more details on using hashes here.

Provenance

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