Skip to main content

Generated from aind-library-template

Project description

ZOMBIE Squirrel

License Code Style semantic-release: angular Interrogate Coverage Python

Logo (image from ChatGPT)

zombie-squirrel is a set of one-line functions that handle the entire process of caching and retrieving data (and metadata) from AIND data assets.

In the background, the ZOMBIE squirrel repackages data/metadata into dataframes and stores them on S3 in a flat bucket, or in memory for testing.

Installation

pip install zombie-squirrel

Usage

Set backend

export FOREST_TYPE='S3'

Options are 'S3', 'MEMORY'.

Scurry (fetch) data

from zombie_squirrel import unique_project_names

project_names = unique_project_names()
Function Description Parameters
unique_project_names Fetch unique project names from docdb
unique_subject_ids Fetch unique subject IDs from docdb
asset_basics Fetch basic asset metadata including modalities, projects, and subject info
source_data Fetch source data references for derived records
raw_to_derived Fetch mapping of raw records to their derived records
qc Fetch QC dataframe for a single or multiple records str or list[str]
custom Store or retrieve a user-defined DataFrame by name name: str, df: pd.DataFrame (optional)

Custom acorn

The custom function allows you to store and retrieve your own user-defined DataFrames in the cache by name. This requires write authentication to the active backend.

from zombie_squirrel import custom
import pandas as pd

df = pd.DataFrame({"col": [1, 2, 3]})
custom("my_data", df)

retrieved_df = custom("my_data")

Hide all the acorns

We run a nightly capsule on Code Ocean with this code to hide all acorns (not the custom ones).

from zombie_squirrel.sync import hide_acorns
hide_acorns()

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

zombie_squirrel-0.14.2.tar.gz (22.9 kB view details)

Uploaded Source

Built Distribution

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

zombie_squirrel-0.14.2-py3-none-any.whl (22.1 kB view details)

Uploaded Python 3

File details

Details for the file zombie_squirrel-0.14.2.tar.gz.

File metadata

  • Download URL: zombie_squirrel-0.14.2.tar.gz
  • Upload date:
  • Size: 22.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for zombie_squirrel-0.14.2.tar.gz
Algorithm Hash digest
SHA256 6e09b80421b648c8b944d7928913880251e385ff54fb83e9d2e0d3d6bbdad84f
MD5 8e8f7c96c60462692005cfa463c3b2db
BLAKE2b-256 c4c7ca75026383deabe0749a4227591a1462451a5531a19c25fdd311c44786b9

See more details on using hashes here.

File details

Details for the file zombie_squirrel-0.14.2-py3-none-any.whl.

File metadata

File hashes

Hashes for zombie_squirrel-0.14.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8c1747fa5fdb6995d09cc6f8dbb5dfe1a56efb8f870492b763ae026d15cab34d
MD5 9c5fe28421573fa6cfa49224ff9c6ea0
BLAKE2b-256 3bfe1fdbcde94c862e27a610d06e9b3594a2e4ee15d77b5514771baa8dbb519b

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