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")
Lists the drafts in the user's mailbox.
curl \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  https://gmail.googleapis.com/gmail/v1/users/{userId}/drafts
Lists all labels in the user's mailbox.
curl \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  https://gmail.googleapis.com/gmail/v1/users/{userId}/labels
Lists the history of all changes to the given mailbox. History results are re…
curl \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  https://gmail.googleapis.com/gmail/v1/users/{userId}/history
SDK on GitHub 📄 API Docs
SDK
python-genai
Python
API
googleapis.com
googleapis.com:gmail
At a glance
Language Python
Endpoints79
Base URLhttps://gmail.googleapis.com
✓ Official