Using python-genai with googleapis.com

Python integration

✓ Official SDK
Install
pip install python-genai
Quick start
import python-genai

# Use an OAuth2 access token
client = python_genai.Client(access_token="YOUR_ACCESS_TOKEN")
Returns the Analytics data.
curl \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  https://analyticsreporting.googleapis.com/v4/reports:batchGet
Returns User Activity data.
curl \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  https://analyticsreporting.googleapis.com/v4/userActivity:search
SDK on GitHub 📄 API Docs
SDK
python-genai
Python
API
googleapis.com
googleapis.com:analyticsreporting
At a glance
Language Python
Endpoints2
Base URLhttps://analyticsreporting.googleapis.com
✓ Official