Utilities for reading and writing lab Google Sheets (e.g. Recordings, Subjects) used in Neuropixels/NWB workflows.
Provides high-level helpers with no explicit client initialization — just import and call.
Install directly from GitHub:
pip install "git+https://github.com/EthanKato/np_sheet_utils@main"For local development (If you install this way you will automatically get any changes I make):
git clone https://github.com/EthanKato/np_sheet_utils.git
cd np_sheet_utils
pip install -e .from np_sheets import sheet_to_df, read_from_recordings, read_from_subjects
# Get a sheet as a df
recordings = sheet_to_df('Recordings')
recordings.head()
subjects = sheet_to_df('Subjects')
subjects.head()
# Read from recordings or subjects
Subject = 'NPXXX'
Block = 'BX'
region = read_from_recordings(Subject, Block, 'Region') # region = 'IFG, STG'
age = read_from_subjects(Subject, 'Age') # age = '31'The package uses a default Google Sheets ID and lazy client initialization.
Override defaults via environment variables or per-call spreadsheet_id=... argument.
MIT