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.
Documentation: https://neuronexus.github.io/radiens-drive-catalog/latest/
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. Non-xdat content found alongside datasets — logs directories, PowerPoints, writeups — is also discovered and tracked as assets.
Usage
Datasets
from radiens_drive_catalog import Catalog, Config
config = Config.from_file("config.json")
catalog = Catalog(config)
# Scan Drive and build the catalog (discovers datasets and assets)
catalog.scan()
# Query datasets using pandas directly
catalog.df
catalog.list() # everything
catalog.list(drive_path="2026-02-15_batch/reaching") # exact folder
catalog.list(drive_path_prefix="2026-02-15_batch") # full date subtree
catalog.list(drive_path_contains="reaching") # any depth
# Download a dataset (3 xdat files)
catalog.download("2026-02-15_batch/reaching", "rat01_session3")
# Get the local path, downloading automatically if needed
path = catalog.get_path("2026-02-15_batch/reaching", "rat01_session3")
Assets (non-xdat content)
Non-xdat files and folders (e.g. logs/, PowerPoints, writeups) found inside experiment folders are automatically cataloged as assets during scan().
# Query assets using pandas directly
catalog.assets_df
catalog.assets_df[catalog.assets_df["drive_path"].str.startswith("2026-02-15_batch")]
catalog.assets_df[catalog.assets_df["asset_type"] == "folder"]
# Download an asset (drive_path is the slash-joined path to the asset's parent folder)
catalog.download_asset("2026-02-15_batch/reaching", "logs")
# Get the local path, downloading automatically if needed
path = catalog.get_asset_path("2026-02-15_batch/reaching", "logs")
Assets land under local_data_dir/assets/{drive_path}/{asset_name}, separate from the path-mirrored xdat dataset files.
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"
}
Config.from_file() locates the config file using this resolution order:
- Explicit
pathargument. RADIENS_DRIVE_CATALOG_CONFIGenvironment variable..secrets/config.jsonin the current working directory.config.jsonin the current working directory.~/.config/radiens-drive/config.json./etc/radiens-drive/config.json.
# Automatic discovery (env var or well-known paths)
config = Config.from_file()
# Explicit path
config = Config.from_file("/path/to/config.json")
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:
- Create a project in Google Cloud Console
- Enable the Google Drive API
- Create a service account and download its JSON credentials file
- Share your root Drive data folder with the service account's email address (Viewer access is sufficient)
- Point
credentials_pathin 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file radiens_drive_catalog-0.0.8.tar.gz.
File metadata
- Download URL: radiens_drive_catalog-0.0.8.tar.gz
- Upload date:
- Size: 130.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0ee5b46528a88cbbd4bce21ba8b643ca85ab5f2ba9e391c85e700baa80a1739a
|
|
| MD5 |
bc6d745c5a6557fe59a7cf851df3a000
|
|
| BLAKE2b-256 |
a83001e8daec05b07db482ab422a44fcf97e1207c2436c5f34c69c0d8ea97793
|
Provenance
The following attestation bundles were made for radiens_drive_catalog-0.0.8.tar.gz:
Publisher:
publish.yml on NeuroNexus/radiens-drive-catalog
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
radiens_drive_catalog-0.0.8.tar.gz -
Subject digest:
0ee5b46528a88cbbd4bce21ba8b643ca85ab5f2ba9e391c85e700baa80a1739a - Sigstore transparency entry: 1354786697
- Sigstore integration time:
-
Permalink:
NeuroNexus/radiens-drive-catalog@29e0b49cc87a4b026f2c0ba8d54e6fbf2d82af8b -
Branch / Tag:
refs/tags/v0.0.8 - Owner: https://github.com/NeuroNexus
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@29e0b49cc87a4b026f2c0ba8d54e6fbf2d82af8b -
Trigger Event:
push
-
Statement type:
File details
Details for the file radiens_drive_catalog-0.0.8-py3-none-any.whl.
File metadata
- Download URL: radiens_drive_catalog-0.0.8-py3-none-any.whl
- Upload date:
- Size: 19.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
945a41662c87accb287cb4c939e066f4281575b0c1afe2e619ac0c33505f1dae
|
|
| MD5 |
4e12df3a65817ce23c2bfb717d5654fe
|
|
| BLAKE2b-256 |
60762b3ba878a3b6378f1c3e90aecdbc70dae0c14de9c87cf42e46d0ac219aa2
|
Provenance
The following attestation bundles were made for radiens_drive_catalog-0.0.8-py3-none-any.whl:
Publisher:
publish.yml on NeuroNexus/radiens-drive-catalog
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
radiens_drive_catalog-0.0.8-py3-none-any.whl -
Subject digest:
945a41662c87accb287cb4c939e066f4281575b0c1afe2e619ac0c33505f1dae - Sigstore transparency entry: 1354786732
- Sigstore integration time:
-
Permalink:
NeuroNexus/radiens-drive-catalog@29e0b49cc87a4b026f2c0ba8d54e6fbf2d82af8b -
Branch / Tag:
refs/tags/v0.0.8 - Owner: https://github.com/NeuroNexus
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@29e0b49cc87a4b026f2c0ba8d54e6fbf2d82af8b -
Trigger Event:
push
-
Statement type: