Skip to main content

No project description provided

Project description

radiens-drive-catalog

A Python package for programmatically managing large neural datasets stored on Google Drive. It handles Drive scanning, local cataloging, and selective dataset download. Analysis is done locally — this package is purely about data management.

Overview

Neural data is stored as xdat filesets (NeuroNexus format) on a shared Google Drive. Each dataset consists of 3 files sharing a common base_name:

{base_name}_data.xdat
{base_name}.xdat.json
{base_name}_timestamp.xdat

radiens-drive-catalog scans the Drive hierarchy, builds a local catalog indexed by base_name, and lets you query and download datasets selectively.

Usage

from radiens_drive_catalog import Catalog, Config

config = Config.from_file("config.json")
catalog = Catalog(config)

# Scan Drive and build the catalog
catalog.scan()

# Query datasets
catalog.list()                                      # everything
catalog.list(date="2026-02-15_batch")               # all datasets in a date folder
catalog.list(date="2026-02-15_batch", experiment="reaching")  # narrowed to an experiment

# Access the raw DataFrame
catalog.df

# Check what's available locally
catalog.status()

# Download a dataset
catalog.download("rat01_session3")

# Get the local path, downloading automatically if needed
path = catalog.get_path("rat01_session3")

Configuration

Create a config.json (outside your repo — do not commit it):

{
    "credentials_path": "/path/to/service_account.json",
    "root_folder_id": "your-drive-folder-id",
    "local_data_dir": "/path/to/local/data",
    "catalog_path": "/path/to/local/data/catalog.json"
}

Or set a single environment variable pointing at the config file, and call from_file() with no arguments:

export RADIENS_DRIVE_CATALOG_CONFIG=/path/to/config.json
config = Config.from_file()

The root_folder_id is the alphanumeric string in the Drive URL when you're inside the root data folder.

Authentication

This package uses a Google service account for shared access among collaborators. To set it up:

  1. Create a project in Google Cloud Console
  2. Enable the Google Drive API
  3. Create a service account and download its JSON credentials file
  4. Share your root Drive data folder with the service account's email address (Viewer access is sufficient)
  5. Point credentials_path in your config at the downloaded JSON file

Distribute the credentials file to collaborators securely — treat it like a password.

Installation

This project uses uv for dependency management. If you don't have it:

macOS / Linux:

curl -LsSf https://astral.sh/uv/install.sh | sh

Windows:

powershell -c "irm https://astral.sh/uv/install.ps1 | iex"

Then install the project:

uv sync

Development

uv run pytest          # run tests
uv run mypy            # type checking
uv run ruff check .    # linting
uv run ruff format .   # formatting

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

radiens_drive_catalog-0.0.1.tar.gz (89.8 kB view details)

Uploaded Source

Built Distribution

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

radiens_drive_catalog-0.0.1-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

Details for the file radiens_drive_catalog-0.0.1.tar.gz.

File metadata

  • Download URL: radiens_drive_catalog-0.0.1.tar.gz
  • Upload date:
  • Size: 89.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for radiens_drive_catalog-0.0.1.tar.gz
Algorithm Hash digest
SHA256 1014f9e0b747aed21c50b65c184fb54fa39eae322af177bba2bfef41690c461a
MD5 03f4855e1d38ec38ac71eea51e1e1035
BLAKE2b-256 0038edb568f8c0e9730666828d8c896c0913f3f8c4f658fa4868856613db7e56

See more details on using hashes here.

Provenance

The following attestation bundles were made for radiens_drive_catalog-0.0.1.tar.gz:

Publisher: publish.yml on NeuroNexus/radiens-drive-catalog

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file radiens_drive_catalog-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for radiens_drive_catalog-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ba00963965ecb55c7764999ebf514cf0836bf74d53dcfc4e2b04270ca4b73964
MD5 4b5d39c364be8a049c73e8a36855d7e5
BLAKE2b-256 4df2458ef8706010dc150079b7557f9ab0f15fd963f247e466962afde2ad89bf

See more details on using hashes here.

Provenance

The following attestation bundles were made for radiens_drive_catalog-0.0.1-py3-none-any.whl:

Publisher: publish.yml on NeuroNexus/radiens-drive-catalog

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