Async HTTP + WebSocket client for Social Home, used by the Home Assistant integration.
Project description
socialhome-client
Async HTTP + WebSocket client for Social Home,
published to PyPI as socialhome-client and consumed by the
Home Assistant integration.
Never imports from social_home (core). Safe to install inside Home
Assistant Core, which runs on Python 3.13.
Install
pip install socialhome-client
Use
The client groups methods under feature resources — e.g. c.me.get(),
c.shopping.add(...), c.bot.create(...) — rather than a flat surface.
import asyncio
from socialhome_client import SocialHomeClient, SocialHomeWsManager
async def main() -> None:
async with SocialHomeClient("http://homeassistant.local:8099", token="…") as sh:
me = await sh.me.get()
print(me.display_name)
await sh.shopping.add("milk")
events = await sh.calendar.list_events("cal-1", "2026-05-01", "2026-06-01")
print(f"{len(events)} events this month")
ws = SocialHomeWsManager(sh)
await ws.connect()
ws.register(
["post_created"],
lambda frame: asyncio.sleep(0, print(frame)),
)
asyncio.run(main())
Bots
Home Assistant automations can post into a space feed through the bot-bridge. Each bot has its own Bearer token (shown once on create) and posts render with the bot's icon + name instead of a generic "Home Assistant" avatar.
# Admin turns on bot posting for the space, then registers a household bot.
await sh.space.update(space_id, bot_enabled=True)
bot = await sh.bot.create(
space_id, scope="space", slug="doorbell",
name="Doorbell", icon="🔔",
)
# Persist bot.token somewhere safe — the backend will not show it again.
await sh.bot.post(
space_id, bot.token,
title="Ring", message="Front door",
)
Develop
pip install -e .[dev]
pre-commit install
pytest
License
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file
socialhome_client-2026.4.24.tar.gz.File metadata
File hashes
73eaf1aaef9f5131fcaebbfeb88ecc978498fc0c48283774c79e6a2aa4d6ac064f2ed58f700c62d700b81e1447e8e8b1ff00a5bd7de4f8b857c8ad7547d3482825e73cfe75bd7e5a53f70975d615028eSee more details on using hashes here.
Provenance
The following attestation bundles were made for
socialhome_client-2026.4.24.tar.gz:Publisher:
Attestations: Values shown here reflect the state when the release was signed and may no longer be current.publish.ymlon social-home-io/socialhome-client-
Statement type:
-
Predicate type:
-
Subject name:
-
Subject digest:
-
Sigstore transparency entry: 1373210345
- Sigstore integration time:
Source repository:https://in-toto.io/Statement/v1https://docs.pypi.org/attestations/publish/v1socialhome_client-2026.4.24.tar.gz73eaf1aaef9f5131fcaebbfeb88ecc978498fc0c48283774c79e6a2aa4d6ac06-
Permalink:
-
Branch / Tag:
-
Owner: https://github.com/social-home-io
-
Access:
Publication detail:social-home-io/socialhome-client@062aa8adc440bde6dc0b9e9bd205d50467f7f925refs/tags/2026.4.24publichttps://token.actions.githubusercontent.comgithub-hostedpublish.yml@062aa8adc440bde6dc0b9e9bd205d50467f7f925release