t3api-utils¶
Python utilities for the T3 (Track and Trace Tools) API.
Provides authentication, data collection, processing, and export tools for working with Metrc cannabis regulatory data through the T3 API.
Installation¶
Quick Start¶
from t3api_utils.main.utils import get_authenticated_client_or_error
from t3api_utils.api.operations import get_collection
# Authenticate (interactive picker for credentials, JWT, or API key)
client = get_authenticated_client_or_error()
# Fetch a paginated collection
response = get_collection(client, "/v2/packages", license_number="LIC-0001")
Package Overview¶
Data Flow¶
- Authentication (
auth) - Create authenticated httpx-based API clients - Collection (
api) - Parallel data fetching with rate limiting - Processing (
db) - Flatten nested data and create relational tables - Output (
file) - Export to CSV/JSON formats
