Skip to main content

Globio Python SDK

The official Python SDK for Globio — game backend infrastructure built on Cloudflare.

PyPI version Python Version License: MIT


What is Globio?

Globio is a backend-as-a-service platform built specifically for game developers. Instead of stitching together Firebase, Supabase, PlayFab, and a handful of other services, you get everything in one SDK at one URL.

Module Service What it does
GlobioId Globio ID Authentication — email, OAuth, SMS, WhatsApp, anonymous
GlobioDoc GlobalDoc Document database — NoSQL, JSON documents
GlobioVault GlobalVault File storage — assets, avatars, replays, saves
GlobioPulse GlobalPulse Live config and feature flags
GlobioSync GlobalSync Real-time multiplayer rooms over WebSocket
GlobioSignal GlobalSignal Real-time notifications over WebSocket
GlobioMart GlobalMart Virtual economy — currencies, items, IAP
GlobioBrain GlobalBrain AI inference and content moderation
GlobioCode GlobalCode Serverless edge functions and hooks
GlobioScope GlobalScope Game analytics — events, funnels, retention

Installation

pip install globio

Requires Python 3.9 or higher.


Quick Start

The Python SDK is fully asynchronous, built on top of httpx and asyncio.

import asyncio
from globio.types import GlobioConfig
from globio.client import GlobioClient
from globio.modules.id import GlobioId

async def main():
    config = GlobioConfig(api_key="glo_client_your_key_here")
    client = GlobioClient(config)
    
    # Initialize the modules you need
    auth = GlobioId(client)
    
    # Use the services
    if not auth.is_signed_in():
        await auth.sign_in_anonymously()
        
    await client.close()

if __name__ == "__main__":
    asyncio.run(main())

Get your API key from the Globio Console.


Authentication — GlobioId

from globio.modules.id import GlobioId

auth = GlobioId(client)

# Sign up
result = await auth.sign_up(
    email="player@example.com", 
    password="securepassword"
)

# Sign in
result = await auth.sign_in("player@example.com", "securepassword")

# Get current user
user = await auth.get_user()

# Check if signed in
if auth.is_signed_in():
    print(f"Logged in as {user.display_name}")

# Update profile
await auth.update_profile({
    "display_name": "New Name",
    "avatar_url": "https://...",
    "metadata": {"level": 5, "clan": "dragons"}
})

# Sign out
await auth.sign_out()

Sessions are stored automatically and tokens are refreshed transparently in memory.


Documents — GlobioDoc

from globio.modules.doc import GlobioDoc

doc_db = GlobioDoc(client)

# Write a document
await doc_db.set("scores", user_id, {
    "score": 1500,
    "level": 12
})

# Read a document
result = await doc_db.get("scores", user_id)
print(result["data"]["score"]) # 1500

# Add a document (auto-generated ID)
await doc_db.add("game_sessions", {
    "player_id": user_id,
    "duration_seconds": 300,
    "map": "desert_storm"
})

# Query documents
results = await doc_db.query("scores", {
    "where": [{"field": "level", "op": ">=", "value": 10}],
    "orderBy": {"field": "score", "direction": "desc"},
    "limit": 10
})

# Delete a document
await doc_db.delete("scores", document_id)

File Storage — GlobioVault

from globio.modules.vault import GlobioVault

vault = GlobioVault(client)

# Upload a file
with open("avatar.png", "rb") as f:
    await vault.upload_file(f"avatars/{user_id}.png", f)

# List files in a path
files = await vault.list_files("avatars/")

# Get a public download URL
url = await vault.get_download_url("avatars/player.png")

# Delete a file
await vault.delete_file("avatars/old-avatar.png")

Live Config & Feature Flags — GlobioPulse

from globio.modules.pulse import GlobioPulse

pulse = GlobioPulse(client)

# Get all configs and flags at once
result = await pulse.get_all("production")
configs = result["data"]["configs"]
flags = result["data"]["flags"]

# Get a specific config value
max_players = await pulse.get_config("max_players")

# Check a feature flag
is_new_map_enabled = await pulse.evaluate_flag("new_map_feature")

if is_new_map_enabled:
    load_new_map()

Analytics — GlobioScope

from globio.modules.scope import GlobioScope

scope = GlobioScope(client)

# Track an event
await scope.track("level_completed", {
    "level": 5,
    "time_seconds": 120,
    "deaths": 2
})

await scope.track("item_purchased", {
    "sku": "sword_of_fire",
    "currency": "GEMS",
    "amount": 50
})

# Force-flush pending events immediately
await scope.flush()

Virtual Economy — GlobioMart

from globio.modules.mart import GlobioMart

mart = GlobioMart(client)

# Get player wallet (all currency balances)
wallet = await mart.get_wallet()
# -> [{"currency_code": "COINS", "balance": 500}, ...]

# Purchase an item
result = await mart.purchase("sword_of_fire", "GEMS")

# Get player inventory
inventory = await mart.get_inventory()

GlobioBrain — AI Agents and Moderation

GlobioBrain provides named AI agents with persistent conversation history and content moderation.

Chat with an Agent

from globio.modules.brain import GlobioBrain

brain = GlobioBrain(client)

# Simple chat — server manages conversation history
result = await brain.chat("support-agent", "How do I reset my password?")
print(result["data"]["response"])

Content Moderation

result = await brain.moderate(
    content="user submitted content here",
    content_type="chat_message"
)

if result["data"]["result"] == "rejected":
    # Block the content
    pass

GlobalCode — Serverless Functions

Invoke serverless HTTP functions directly from your Python backend.

from globio.modules.code import GlobioCode

code = GlobioCode(client)

# Invoke from server/client
result = await code.invoke("matchmaking", {
    "userId": "user_123",
    "rating": 1450,
    "region": "africa"
})

print(result["data"]["roomId"])

Error Handling

Every API call returns standard exceptions for different failure types.

from globio.exceptions import GlobioAuthError, GlobioValidationError

try:
    await auth.sign_in(email, password)
except GlobioAuthError as e:
    print(e.code)    # e.g., 'INVALID_CREDENTIALS'
    print(e.message) # e.g., 'Email or password is incorrect'
except GlobioValidationError as e:
    print("Invalid input format")

Type Hinting

The SDK is strictly typed and ships with full type annotations. All methods return strongly typed objects (defined in globio.types).


License

MIT © Globio Technologies

Metadata

Release files for globio 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for globio 0.1.0
File Size Uploaded Provenance Actions
globio-0.1.0.tar.gz 21.4 kB With provenance Details for globio-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for globio 0.1.0
File Interpreter ABI Platform Actions
globio-0.1.0-py3-none-any.whl Python 3 none any Details for globio-0.1.0-py3-none-any.whl

Total release size: 44.3 kB

Release files / globio-0.1.0.tar.gz

Download URL globio-0.1.0.tar.gz
Size 21.4 kB
Tags Source
SHA-256 checksum
How to use checksums
42739fc96d05171c2fc16bd5b3e7de5f779e69e6e17ac87dd990525a6d8a6801
BLAKE2b-256 checksum
How to use checksums
e7e489aad02b3c6fcb7c95273ff321ac9378c81b25a76fdd0bbb36194b5b3073
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 4, 2026.

Transparency log

Release files / globio-0.1.0-py3-none-any.whl

Download URL globio-0.1.0-py3-none-any.whl
Size 23.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
88af247501150dde41dd1b8c1af3ec97d93c5f1dee5166352a3d71e47314dad1
BLAKE2b-256 checksum
How to use checksums
4cf68be4a3444387171f1fefbb1c0ac224020ea7f89c63f2534f323aec81cc30
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 4, 2026.

Transparency log

Security for globio 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for globio-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 4, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page