Skip to content

skimindex.unix.download

skimindex.unix.download

Download utilities using curl via plumbum.

Provides Pythonic interface to curl for HTTP/HTTPS operations.

curl

curl(*args: str) -> LoggedBoundCommand

Execute curl command with given arguments.

Returns a Command object that can be executed with ().

Parameters:

Name Type Description Default
*args str

Arguments to pass to curl

()

Returns:

Name Type Description
Command LoggedBoundCommand

plumbum Command object to be executed with ()

curl_download

curl_download(
    url: str, *extra_args: str
) -> LoggedBoundCommand

Download from URL with sensible defaults for robustness.

Includes
  • HTTP/2 support (faster like modern browsers)
  • User-Agent header (avoid throttling)
  • Max time: 300 seconds (5 minutes)
  • Automatic retries: up to 3 times on failure
  • Silent mode (-s) and follow redirects (-L)

Parameters:

Name Type Description Default
url str

URL to download

required
*extra_args str

Additional curl arguments (e.g., "-o", "filename")

()

Returns:

Name Type Description
Command LoggedBoundCommand

plumbum Command object to be executed with ()