Skip to main content

Python API for fetching PRIDE Archive dataset files.

Project description

PrideFetch

PrideFetch is a Python API package for discovering and downloading PRIDE Archive dataset files. It wraps the PRIDE REST API, resolves file download URLs, and provides parallel downloads with resume support.

Installation

pip install pridefetch

Quick Start

from pridefetch import list_raw_files, download_files

accession = "PXD032067"
files = list_raw_files(accession)

results = download_files(
    accession,
    files,
    output_dir="./downloads/PXD032067",
    overwrite=False,
    resume=True,
    workers=4,
    show_progress=False,
    verify_checksums=True,
)

print(results)

Authenticated Access

PrideFetch supports API key authentication using a configurable header.

from pridefetch import AuthConfig, PrideFetchClient

auth = AuthConfig(api_key="your-token", header_name="X-API-Key")

with PrideFetchClient(auth=auth) as client:
    files = client.list_raw_files("PXD032067")
    results = client.download_files("PXD032067", files)

You can also load credentials from environment variables:

export PRIDEFETCH_API_KEY="your-token"
export PRIDEFETCH_API_KEY_HEADER="X-API-Key"
from pridefetch import PrideFetchClient, load_auth_from_env

with PrideFetchClient(auth=load_auth_from_env()) as client:
    project = client.fetch_project("PXD032067")
    print(project["title"])

API Overview

  • fetch_project(accession)
  • list_files(accession)
  • list_raw_files(accession)
  • filter_files(files, ...)
  • build_download_tasks(accession, files, ...)
  • download_files(accession, files, ...)
  • PrideFetchClient for session reuse and auth

Development

See the user guide in DEV.md.

License

MIT License

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

pridefetch-0.5.0.tar.gz (10.4 kB view details)

Uploaded Source

Built Distribution

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

pridefetch-0.5.0-py3-none-any.whl (11.8 kB view details)

Uploaded Python 3

File details

Details for the file pridefetch-0.5.0.tar.gz.

File metadata

  • Download URL: pridefetch-0.5.0.tar.gz
  • Upload date:
  • Size: 10.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for pridefetch-0.5.0.tar.gz
Algorithm Hash digest
SHA256 ba911dea31ddc5fadbe8cdb6741ce52ce02c482c98ad5e8969621e3db4adf687
MD5 1ce7e3f3eb62109527be50a29c8e3141
BLAKE2b-256 335e098aaf7bf47871b6dc634a1ed68ecb003e35f41d26c0c0fbaf7a3d9aba64

See more details on using hashes here.

File details

Details for the file pridefetch-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: pridefetch-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 11.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for pridefetch-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b1e3e90d0e2b1631bd49e00ea76bfdf6cc82c26dbe7db90ea51ca385b0f376ff
MD5 31657c982d058615e816eb4f250fc73a
BLAKE2b-256 4ef1d2a58e8e6bedc8041c4a43516019957933e5befffc0831ce7c7db60cf59f

See more details on using hashes here.

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