Skip to main content

labretriever

A Python package for querying and managing genomic and transcriptomic datasets hosted on HuggingFace Hub. It provides a unified SQL interface (via DuckDB) across heterogeneous datasets, with local caching and structured metadata exploration.

See the documentation for full usage guides and API reference. The BrentLab yeast resources collection is an example of datasets designed to work with this package.

Installation

Install the latest release from PyPI:

pip install labretriever

To get the most recent changes ahead of a PyPI release, install directly from the main branch on GitHub:

pip install git+https://github.com/cmatKhan/labretriever.git@main

Set your HuggingFace token if accessing private datasets:

export HF_TOKEN=your_token_here

Usage

from labretriever import VirtualDB

vdb = VirtualDB("config.yaml")

# Discover available views
vdb.tables()
vdb.describe("harbison")

# Query with SQL
df = vdb.query("SELECT * FROM harbison_meta WHERE carbon_source = $cs", cs="glucose")

VirtualDB loads datasets from HuggingFace (caching locally), constructs DuckDB views over Parquet files, and exposes metadata and full-data views for SQL querying. See the docs for how to write a config.yaml and structure your HuggingFace dataset cards.

Development

git clone https://github.com/cmatKhan/labretriever
cd labretriever
poetry install
poetry run pre-commit install
poetry run pytest

Metadata

Release files for labretriever 1.1.5

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

Source distribution (sdist)

Source distribution for labretriever 1.1.5
File Size Uploaded
labretriever-1.1.5.tar.gz 127.5 kB Details

Built distribution (wheel)

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

Total release size: 268.3 kB

Release files / labretriever-1.1.5.tar.gz

Download URL labretriever-1.1.5.tar.gz
Size 127.5 kB
Tags Source
SHA-256 checksum
How to use checksums
a1caaa7e06dd6b39f7debef37a59daf41b8f3f6156052ad5facaf4e58cd3bf09
BLAKE2b-256 checksum
How to use checksums
4dac246f1b1da892fa16b599fa7dcee542e1f46ea9138ecc976e8890bcbf1966
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 9, 2026.

Transparency log

Release files / labretriever-1.1.5-py3-none-any.whl

Download URL labretriever-1.1.5-py3-none-any.whl
Size 140.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8f6ce3517d7a45fd5e63444ebf02e7b6c2024cc69e9e170e6eb74b879a379934
BLAKE2b-256 checksum
How to use checksums
2aa7924533709c3bbaf77cf83efd72def6e28975638ce60a9e2300faeddf667f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 9, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.1.5 This release

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.0

2 release files

0.5.0

2 release files

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