pyhomecast
Async Python client for the Homecast REST API.
Installation
pip install pyhomecast
Usage
import aiohttp
from pyhomecast import HomecastClient
async with aiohttp.ClientSession() as session:
client = HomecastClient(session)
client.authenticate("your_access_token")
# Get all device state
state = await client.get_state()
for device in state.devices.values():
print(f"{device.name} ({device.device_type}): {device.state}")
# Control a device
await client.set_state({
"my_home_0bf8": {
"living_room_a1b2": {
"ceiling_light_c3d4": {"on": True, "brightness": 80}
}
}
})
# Run a scene
await client.run_scene("my_home_0bf8", "Good Morning")
API
HomecastClient(session, api_url="https://api.homecast.cloud")
authenticate(token)- Set the Bearer tokenget_state(home?, room?, device_type?, name?)- Fetch device state (returnsHomecastState)set_state(updates)- Control devicesrun_scene(home, name)- Execute a scene
Models
HomecastState- ContainsdevicesandhomesdictsHomecastDevice- Single device withstate,settable,device_typeHomecastHome- Home withkeyandname
Exceptions
HomecastError- Base exceptionHomecastAuthError- 401/403 errorsHomecastConnectionError- Network/server errors
License
MIT
Metadata
Release files for pyhomecast 0.3.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 |
|---|---|---|---|---|
| pyhomecast-0.3.0.tar.gz | 10.1 kB | With provenance | Details for pyhomecast-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyhomecast-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for pyhomecast-0.3.0-py3-none-any.whl |
Total release size: 19.6 kB
Release files / pyhomecast-0.3.0.tar.gz
| Download URL | pyhomecast-0.3.0.tar.gz |
|---|---|
| Size | 10.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
619e593983af0c58ffd88d9193e4e8f199759726b5a68cb463f34e9a68758eb7
|
|
BLAKE2b-256 checksum How to use checksums |
6927540e3ad985cfc7048298bef0152bb40cd7f6fa2b550c76dade535a389923
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Apr 5, 2026.
Transparency logRelease files / pyhomecast-0.3.0-py3-none-any.whl
| Download URL | pyhomecast-0.3.0-py3-none-any.whl |
|---|---|
| Size | 9.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8fa49cbd54ff475495f65d6d07a2df5c0906d036d0343459355f241985fa5b95
|
|
BLAKE2b-256 checksum How to use checksums |
50b44646069a59f88257591c8dfb852d581eefc7b1c5d616bfe6563c1fa9121e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Apr 5, 2026.
Transparency logSecurity for pyhomecast 0.3.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 pyhomecast-0.3.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 Apr 5, 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.