g3t-etl

raw JSON →
0.0.1rc26 verified Sat May 09 auth: no python

g3t-etl (Gen3 Transfer ETL) is a utility library for working with Gen3 data commons. It provides tools for data transfer, validation, and extraction. Current version 0.0.1rc26, requires Python >=3.9, <4. Under active development with frequent releases.

pip install g3t-etl
error ModuleNotFoundError: No module named 'g3t_etl'
cause Library not installed or installed under a different name.
fix
Run: pip install g3t-etl
error AttributeError: 'TransferClient' object has no attribute 'list_projects'
cause Using outdated version where method was named differently or not available.
fix
Update to the latest version: pip install --upgrade g3t-etl
error g3t_etl.transfer.TransferError: 401 Unauthorized
cause Invalid or missing API key.
fix
Check that GEN3_API_KEY environment variable is set correctly and not expired.
breaking In version 0.0.1rc25, the TransferClient constructor changed from requiring 'gen3_endpoint' and 'gen3_api_key' to 'endpoint' and 'api_key'. Update your code accordingly.
fix Use TransferClient(endpoint='...', api_key='...') instead of the old keyword arguments.
deprecated The 'validate_manifest' function in g3t_etl.validation is deprecated in favor of 'validate_manifest_with_schema' which provides more detailed errors.
fix Replace g3t_etl.validation.validate_manifest() with g3t_etl.validation.validate_manifest_with_schema().
gotcha The library expects environment variables GEN3_API_KEY or GEN3_CREDENTIALS to be set for authentication. Missing these will cause silent authentication failures.
fix Set GEN3_API_KEY (or GEN3_CREDENTIALS) environment variable before using any client.

Initialize a TransferClient with Gen3 endpoint and API key. List available projects as a basic operation.

import os
from g3t_etl.transfer import TransferClient

# Initialize client (uses GEN3_API_KEY or GEN3_CREDENTIALS env vars)
client = TransferClient(endpoint='https://example.com', api_key=os.environ.get('GEN3_API_KEY', ''))

# List available projects
projects = client.list_projects()
print(projects)