HosteDay Python SDK (hosteday_python)
Official asynchronous Python SDK for HosteDay — isolated cloud backends with standard REST CRUD, authentication, Laravel Reverb / Pusher v7 realtime WebSockets, push notifications, background jobs, and an embedded BFF web server.
Designed for 100% architectural and wire-protocol parity with hosteday_flutter and hosteday_kotlin.
Installation
pip install hosteday_python
Optional extras:
# Encrypted private channels (PyNaCl)
pip install "hosteday_python[crypto]"
# OS keyring session persistence
pip install "hosteday_python[encrypted]"
# Rich CLI output
pip install "hosteday_python[cli]"
# Everything
pip install "hosteday_python[all]"
Zero-Config Setup CLI
Generate hosteday_config.json (or .env) directly from your HosteDay dashboard setup token:
hosteday-setup --project my-app --token "<setup_token>" --output hosteday_config.json
# Or generate a .env file:
hosteday-setup --project my-app --token "<setup_token>" --format env --output .env
Quickstart
You can import from either hosteday or hosteday_python:
import asyncio
from pathlib import Path
from hosteday import Hosteday, JsonFileHostedayAuthStorage
async def main() -> None:
await Hosteday.initialize_app(
config_path=Path("hosteday_config.json"),
auth_storage=JsonFileHostedayAuthStorage(Path(".hosteday_session.json")),
)
try:
# 1. Authentication
cred = await Hosteday.auth.sign_in_with_email_and_password(
email="dev@hosteday.com",
password="StrongPassword!123",
)
print("Signed in:", cred.user.display_name)
# 2. Standard CRUD (index, show, create, update, delete)
# No `/api/` prefix needed — Hosteday resolves `/api` automatically.
page = await Hosteday.client.index(
"notes",
page=1,
per_page=15,
search="launch",
with_auth=True,
)
first = await Hosteday.client.show("notes", id=page.items[0]["id"], with_auth=True)
created = await Hosteday.client.create("notes", body={"data": "Shipped v0.1.0!"})
updated = await Hosteday.client.update("notes", id=created["id"], body={"data": "Updated!"})
await Hosteday.client.delete("notes", id=updated["id"])
# 3. Realtime WebSockets (Laravel Reverb / Pusher v7)
await Hosteday.realtime.listen_public(
channel="announcements",
event="NotificationReceived",
on_event=lambda e: print(e.name, e.payload),
)
# 4. Push Notifications
await Hosteday.notifications.sync_device_token(
token="<fcm_device_token>",
device_type="web",
device_name="Chrome Desktop",
)
# 5. Background Jobs
job = await Hosteday.jobs.dispatch(name="GenerateReport", payload={"report_id": 1})
print("Job ID:", job.job_id, "Status:", job["status"])
finally:
await Hosteday.dispose()
asyncio.run(main())
Embedded Web App & BFF Server (HostedayWebApp)
Build and serve a full SPA + BFF web application with built-in auth, realtime channel authorization, device token sync, and one-line CRUD endpoints — without writing any web-framework boilerplate:
from pathlib import Path
from hosteday import Hosteday
web = Hosteday.create_web_app(
title="My HosteDay App",
config_path=Path("hosteday_config.json"),
static_dir=Path("static"),
)
# Register GET/POST/PUT/DELETE /bff/notes in one line:
web.crud("notes", owner_field="user_id")
# Or add custom routes cleanly:
@web.get("health")
async def health() -> dict[str, bool]:
return {"ok": True}
if __name__ == "__main__":
web.serve(host="127.0.0.1", port=8000)
Development & Verification
pip install -e ".[dev]"
ruff check src tests examples
mypy src
pytest -v
Official Links
- SDK Portal: https://hosteday.com/sdks/hosteday-python
- Documentation: https://hosteday.com/docs/hosteday-python
- PyPI: https://pypi.org/project/hosteday_python/
- Source & Issues: https://github.com/mustafa3max/hosteday-python
Metadata
Release files for hosteday-python 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| hosteday_python-0.1.0.tar.gz | 67.2 kB | With provenance | Details for hosteday_python-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| hosteday_python-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for hosteday_python-0.1.0-py3-none-any.whl |
Total release size: 139.4 kB
Release files / hosteday_python-0.1.0.tar.gz
| Download URL | hosteday_python-0.1.0.tar.gz |
|---|---|
| Size | 67.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
03c502b99aebd4711a82fb5b03d45e5d837f9cda174289533bbb2f6479f16329
|
|
BLAKE2b-256 checksum How to use checksums |
22fe15887dbdb5bae5c20f4d33a4b6f1571294ed9af35bdf4fee30ffc8593d9d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 28, 2026.
Transparency logRelease files / hosteday_python-0.1.0-py3-none-any.whl
| Download URL | hosteday_python-0.1.0-py3-none-any.whl |
|---|---|
| Size | 72.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
630221a6a85cd1bc9f83d58dbb2b25f14caac0e8ba31fc486b792a883d644c66
|
|
BLAKE2b-256 checksum How to use checksums |
b65ad8c71a662e045d4675bccb2123ea03fbff39bd704ba25891c0451c6260c8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 28, 2026.
Transparency logSecurity for hosteday-python 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.
Attestation for hosteday_python-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 Nov 28, 2026.
Transparency logA 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.