afsapi
Asynchronous implementation of the Frontier Silicon API
What it is and what it does
afsapi is an async Python library for communicating with Frontier Silicon internet radio devices over HTTP. It wraps the device's REST API, allowing you to query and control power state, input modes, presets, equalizer settings, and sleep timers from Python code. The library was originally built to integrate Frontier Silicon radios into Home Assistant but works as a standalone client for any application needing programmatic radio control.
The package depends on aiohttp for async HTTP requests and defusedxml for safe XML parsing of device responses. It supports Python 3.10 through 3.14 and includes integration tests that can record and replay real device responses, making it testable without hardware access.
Use it for:
- Integrate Frontier Silicon radios into Home Assistant or other home automation systems.
- Build a web dashboard to control multiple radios from a central interface.
- Automate radio power and preset selection based on time of day or events.
- Query device state (current mode, power status, available presets) for monitoring.
- Set sleep timers and equalizer presets programmatically.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Asynchronous Python client for controlling Frontier Silicon radio devices via their HTTP API, enabling remote power, mode, preset, and equalizer management.
Yes. The package is actively maintained, has low install friction, carries a permissive license, and solves a specific problem (Frontier Silicon device control) with a clean async API. No known vulnerabilities. Install if you own a compatible Frontier Silicon device and need to control it from Python.
Install
afsapi on PyPI
pip
pip install afsapiuv
uv add afsapipoetry
poetry add afsapiInstalling afsapi
Before you install
Low install friction with only two runtime dependencies (aiohttp and defusedxml). Actively maintained with a recent release; repository is not archived.
License in practice
Licensed under Apache-2.0 (permissive), allowing commercial and private use with minimal restrictions.
Quickstart
import asyncio
from afsapi import AFSAPI
async def control_radio():
afsapi = await AFSAPI.create('http://192.168.1.XYZ:80/device', 1234, 1)
await afsapi.set_power(True)
print(await afsapi.get_friendly_name())
asyncio.run(control_radio())
Requires Python 3.10 or later; device must be on the same network and accessible at a known IP address with PIN authentication.
Verify before relying
- Whether the package supports all Frontier Silicon device models or only specific ones.
- Performance characteristics when controlling multiple devices concurrently.
- Timeout and retry behavior for unreliable network conditions.
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — aiohttp, defusedxml |
| Maintenance | actively maintained — 18 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 74,528/month — #14,821 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: afsapi-1.0.2-py3-none-any.whl
Tags
More Libraries packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
python-dateutilProvides parsing, arithmetic, and recurrence…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
pybraviaProvides an async Python interface to control…
permissive · top 15,000 on PyPI
pysensiboProvides an asyncio-friendly Python API client…
permissive · top 15,000 on PyPI
rf-protocolsDecodes and encodes radio frequency signals for…
permissive · top 15,000 on PyPI
rokuecpAn asynchronous Python client for controlling…
permissive · top 15,000 on PyPI
aiohomekitAn asyncio-based HomeKit client library for…
permissive · top 15,000 on PyPI
python-kasaControl TP-Link Kasa and Tapo smart home…
copyleft · top 15,000 on PyPI
directvAsynchronous Python client for controlling and…
permissive · top 15,000 on PyPI
pyisyPyISY is a Python library for asynchronous…
permissive · top 15,000 on PyPI
aiomusiccastProvides async Python bindings to control…
unclear · top 15,000 on PyPI
aiohomematicAn async Python library for controlling and…
permissive · top 15,000 on PyPI