Official Python SDK
Official async-first Python SDK for HosteDay — connect backends, AI agents, and apps via hosteday_config.json or env vars with standard CRUD, Auth, Realtime WebSockets (Reverb), Push Notifications, Background Jobs, and an embedded Web App engine.
Package Overview
The official hosteday_python SDK is an async-first, PEP 561 strictly typed library for connecting Python backends, desktop/CLI apps, and AI agents to HosteDay in minutes. It features zero-config initialization via hosteday_config.json or the hosteday-setup CLI, standard CRUD with QueryBuilder, pluggable Auth storage, Reverb WebSockets (Public/Private/Presence/Encrypted), Push Notifications, Background Jobs, and an embedded HostedayWebApp BFF server.
Key Capabilities
- Zero-config hosteday_config.json & hosteday-setup CLI
- Standard CRUD (index / show / create / update / delete)
- Realtime WebSockets (Reverb) & Push Notifications
- Embedded Web App Engine (HostedayWebApp)
Installation & Setup
Add the dependency to your project, then download hosteday_config.json from SDK Connect in your dashboard.
# Recommended: install inside a virtual environment
python3 -m venv .venv
source .venv/bin/activate
pip install hosteday_python
# Optional extras:
# pip install "hosteday_python[crypto]" # Private-encrypted Realtime channels (PyNaCl)
# pip install "hosteday_python[encrypted]" # OS Keyring session storage
# pip install "hosteday_python[cli]" # Rich CLI formatting
# pip install "hosteday_python[all]" # All optional extras
# Zero-config cloud setup CLI:
hosteday-setup --project my-app --token "<setup_token>" --output hosteday_config.json
Modules Breakdown
Clean modular architecture so you can include only the components your application needs.
Hosteday / HostedayClient
Zero-config loading from hosteday_config.json or HOSTEDAY_* env vars, isolated multi-project context managers, and connectivity probes.
Standard CRUD & QueryBuilder
Paginated HostedayPage reads, Laravel filter encoding, search, relations, and automatic PATCH-to-PUT fallback.
HostedayAuth
10 auth operations, avatar upload, reactive async streams, and Memory, 0600 JSON file, or OS Keyring storage.
HostedayRealtimeClient
Public, Private, Presence, and PyNaCl Encrypted channels with Whisper events, heartbeats, and exponential backoff reconnect.
Notifications & Jobs
Device token sync, hybrid push sending, and background job dispatching with status tracking.
HostedayWebApp
Built-in BFF server wrapping FastAPI/Uvicorn with automatic auth/realtime endpoints, one-line web.crud(), and SPA serving.
Interactive Code Examples
Copy-ready examples covering initialization, authentication, database CRUD filters, and realtime WebSockets.
import asyncio
from pathlib import Path
from hosteday import Hosteday, HostedayClient, HostedayConfig, JsonFileHostedayAuthStorage
async def main() -> None:
await Hosteday.initialize_app(
config_path=Path("hosteday_config.json"),
auth_storage=JsonFileHostedayAuthStorage(Path(".hosteday_session.json")),
)
print("Online:", Hosteday.is_online, "| Host:", Hosteday.client.host)
await Hosteday.dispose()
# Or isolated multi-project client from HOSTEDAY_* env vars
async with HostedayClient(config=HostedayConfig.from_env()) as client:
print("Isolated project:", client.api_base_url)
asyncio.run(main())
More HosteDay SDKs
Explore other official packages to ship cross-platform apps on the same cloud backend.
HosteDay Flutter SDK
Official Dart & Flutter SDK to connect your mobile and web apps to HosteDay via unified hosteday_config.json, with built-in Auth, Database CRUD, Realtime WebSockets, and Push Notifications.
HosteDay Kotlin & Android SDK
Modular Kotlin & Android SDK built with Coroutines, Flow, and Jetpack Compose support. Seamlessly integrates hosteday_config.json, Database CRUD, Reverb WebSockets, and FCM notifications.