Introduction

Gspace is a comprehensive Python SDK for Google Workspace APIs that simplifies interactions with Calendar, Gmail, Drive, Docs, Sheets, and more through a single, intuitive interface.

Why Gspace?

Instead of juggling multiple SDKs, authentication flows, and scattered scopes, Gspace provides:

  • Single Authentication - OAuth2 or Service Account credentials
  • Consistent API Wrappers - Unified interface across all Google services
  • Comprehensive Logging - Built-in logging with configurable levels
  • Helper Methods - Common tasks simplified (send email, create event, upload file, etc.)
  • Type Hints - Full Python type annotations for better development experience
  • Error Handling - Robust error handling with detailed logging
  • Extensible Design - Easy to add new Google Workspace APIs

Quick Example

python
from gspace import GSpace
from datetime import datetime, timedelta

# Initialize with OAuth2
gspace = GSpace.from_oauth(
    credentials_file="credentials.json",
    scopes=["calendar", "gmail"]
)

# Use Calendar service
calendar = gspace.calendar()
event = calendar.create_event(
    summary="Team Meeting",
    start_time=datetime.now() + timedelta(hours=1),
    end_time=datetime.now() + timedelta(hours=2)
)

# Use Gmail service
gmail = gspace.gmail()
gmail.send_simple_email(
    to="team@company.com",
    subject="Meeting Reminder",
    body="Don't forget our meeting!"
)

What's Next?