Back to All SDKs
Official SDK Python v0.1.0 Official Python SDK status badge PyPI 0.1.0

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.

Registry
pypi
Package Identifier
hosteday_python
Minimum SDK
Python 3.10+
Views
16

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

Core
Core Facade, Config & Multi-Project Client

Zero-config loading from hosteday_config.json or HOSTEDAY_* env vars, isolated multi-project context managers, and connectivity probes.

Artifact / Import
from hosteday import Hosteday, HostedayClient, HostedayConfig

Standard CRUD & QueryBuilder

CRUD
Standard CRUD Engine & QueryBuilder

Paginated HostedayPage reads, Laravel filter encoding, search, relations, and automatic PATCH-to-PUT fallback.

Artifact / Import
Hosteday.client.index / show / create / update / delete

HostedayAuth

Auth
Authentication & Pluggable Storage

10 auth operations, avatar upload, reactive async streams, and Memory, 0600 JSON file, or OS Keyring storage.

Artifact / Import
from hosteday import HostedayAuth, KeyringHostedayAuthStorage

HostedayRealtimeClient

WebSockets
Realtime WebSockets & Presence

Public, Private, Presence, and PyNaCl Encrypted channels with Whisper events, heartbeats, and exponential backoff reconnect.

Artifact / Import
Hosteday.realtime.subscribe_presence / listen_private

Notifications & Jobs

Async
Push Notifications & Background Jobs

Device token sync, hybrid push sending, and background job dispatching with status tracking.

Artifact / Import
Hosteday.notifications / Hosteday.jobs

HostedayWebApp

Web App
Embedded Web App Server (BFF)

Built-in BFF server wrapping FastAPI/Uvicorn with automatic auth/realtime endpoints, one-line web.crud(), and SPA serving.

Artifact / Import
Hosteday.create_web_app() / web.crud("notes")

Interactive Code Examples

Copy-ready examples covering initialization, authentication, database CRUD filters, and realtime WebSockets.

python
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.