Skip to main content

P.U.D.L.y

Python Url Downloader Library 🤷

pre-commit.ci status pytest uv Ruff gitmoji

The goal of this library to create easy to use functions to download files in Python.

Examples

Downloading one file

The download function can be used to download a file from an url. The function returns the downloaded file's path.

from pudly.pudly import download

url = "https://databank.worldbank.org/data/download/WDI_CSV.zip"
file = download(url)

assert file.exists()

It takes optional arguments to specify the download directory or any query parameters for the request.

from pudly.pudly import download
from pathlib import Path

url = "https://api.worldbank.org/v2/en/indicator/NY.GDP.MKTP.CD"
query_parameters = {"downloadformat": "csv"}
download_directory = Path("data")

file = download(url, download_dir=download_directory, query_parameters=query_parameters)

assert file.exists()

Downloading multiple files

The download_files_concurrently function uses threading to download files in parallel. It returns the list of the downloaded file's path.

from pathlib import Path
from pudly.pudly import download_files_concurrently

urls = [
    "https://api.worldbank.org/v2/en/indicator/SP.POP.TOTL?downloadformat=csv",
    "https://api.worldbank.org/v2/en/indicator/NY.GDP.MKTP.CD?downloadformat=csv",
    "https://api.worldbank.org/v2/en/indicator/EN.POP.DNST?downloadformat=csv",
]
download_dictionary = Path("data")

files = download_files_concurrently(urls, download_dir=download_dictionary)

for file in files:
    assert file.exists()

Metadata

Release files for pudly 2.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pudly 2.0.0
File Size Uploaded Provenance Actions
pudly-2.0.0.tar.gz 7.4 kB With provenance Details for pudly-2.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pudly 2.0.0
File Interpreter ABI Platform Actions
pudly-2.0.0-py3-none-any.whl Python 3 none any Details for pudly-2.0.0-py3-none-any.whl

Total release size: 12.6 kB

Release files / pudly-2.0.0.tar.gz

Download URL pudly-2.0.0.tar.gz
Size 7.4 kB
Tags Source
SHA-256 checksum
How to use checksums
a30be04f6a27bda2b87371bd6d781d0dbeff7026b6febcffd6976fddd3a911c3
BLAKE2b-256 checksum
How to use checksums
e3a749ff2d1093b6bf0d44f2781e0fe8af1e8f641e459cc171f921b021ed1bf4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.1 CPython/3.12.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 28, 2024.

Transparency log

Release files / pudly-2.0.0-py3-none-any.whl

Download URL pudly-2.0.0-py3-none-any.whl
Size 5.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8cc5c84ba82c973efab99072ca4e81c8ddca3c94f867b27d99fa8dc7068db177
BLAKE2b-256 checksum
How to use checksums
67b7f550c799c3ee71f35fae0ac32cf988c47d226b0e6e53ed18acf429307517
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.1 CPython/3.12.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 28, 2024.

Transparency log

Security for pudly 2.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for pudly-2.0.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 28, 2024.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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