$npx skillfedfor your agent

HAP-python

HomeKit Accessory Protocol implementation in python

With conditionsPyPI Python ModulesReleased Aug 202588.8K downloads / moApache-2.0Pure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — hap_python-5.0.0-py3-none-any.whl
v5.0.0 · released 2025-08-25 · Python >=3.9 · 6 runtime deps: async_timeout, cryptography, chacha20poly1305-reuseable, orjson, zeroconf, h11

Yes, if you want to add HomeKit support to a Python project on a local network. The library is stable and production-ready, with low install friction and permissive licensing. The aging maintenance status (354 days since last release) is a minor concern for new features but not a blocker for existing functionality. Requires system-level Avahi/Bonjour setup and Python 3.9+.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Avahi/Bonjour system library; on Raspberry Pi install libavahi-compat-libdnssd-dev first.
  • Minimum Python 3.9.
  • Low install friction with a pure-wheel distribution.

License · maintenance · safety

Apache-2.0 (permissive) — Apache-2.0 permissive license allows commercial and private use with minimal restrictions, making it safe for both hobby and production smart home projects.

last release 2025-08-25 (354 days) · last repo commit 2025-09-09 · 669 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 88,777 downloads/mo, #13,706 on PyPI

Verify before relying

pip3 install HAP-python[QRCode]

from pyhap.accessory import Accessory, Category

class MyAccessory(Accessory):
    category = Category.SENSOR
    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)
        service = self.add_preload_service('TemperatureSensor')
        self.temp = service.get_characteristic('CurrentTemperature')
  • Whether camera streaming works reliably with modern ffmpeg versions and various platforms
  • Current state of Home Assistant integration and whether it remains actively maintained
  • Performance and stability under high accessory counts or frequent state changes
  • Specific port and network configuration requirements for AccessoryDriver setup
Same gist for agents: .md · .json

What it is and what it does

HAP-python is a Python implementation of Apple's HomeKit Accessory Protocol that lets you turn any Python-capable device into a HomeKit-compatible smart home accessory. You define accessories by subclassing Accessory, add services like TemperatureSensor or Lightbulb with their characteristics, and let the AccessoryDriver handle the HAP server, local network advertising via mDNS, and secure pairing. The library supports asyncio for concurrent operations and includes out-of-the-box definitions for Apple-defined services.

The package is built on six core dependencies: async_timeout for timeout handling, cryptography and chacha20poly1305-reuseable for secure pairing, orjson for efficient JSON serialization, zeroconf for mDNS advertising, and h11 for HTTP/1.1 protocol handling. It's designed to run on resource-constrained devices like Raspberry Pi but works on any platform with Python 3.9+. Once running, your accessory appears in the Home app, can be controlled via the Home app UI, and responds to Siri voice commands.

Use it for

  • Build a temperature or humidity sensor that reports readings to the Home app periodically
  • Create a smart light or switch that can be toggled from the Home app or controlled by Siri
  • Stream video from a camera accessory to HomeKit clients with negotiated resolution and audio
  • Run multiple accessories in a single process using asyncio for concurrent state management
  • Integrate existing IoT devices or GPIO-based hardware into HomeKit without a separate bridge

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you want to add HomeKit support to a Python project on a local network.

The library is stable and production-ready, with low install friction and permissive licensing. The aging maintenance status (354 days since last release) is a minor concern for new features but not a blocker for existing functionality. Requires system-level Avahi/Bonjour setup and Python 3.9+.

Install

hap-python on PyPI

Before you install

Low install friction with a pure-wheel distribution. Maintenance is aging—last release was 354 days ago—but the project remains active with recent commits and stable production status. Requires Avahi/Bonjour system library (libavahi-compat-libdnssd-dev on Raspberry Pi).

Requires Avahi/Bonjour system library; on Raspberry Pi install libavahi-compat-libdnssd-dev first. Minimum Python 3.9.

License in practice

Apache-2.0 permissive license allows commercial and private use with minimal restrictions, making it safe for both hobby and production smart home projects.

Quickstart

pip3 install HAP-python[QRCode]

from pyhap.accessory import Accessory, Category

class MyAccessory(Accessory):
    category = Category.SENSOR
    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)
        service = self.add_preload_service('TemperatureSensor')
        self.temp = service.get_characteristic('CurrentTemperature')

Verify before relying

  • Whether camera streaming works reliably with modern ffmpeg versions and various platforms
  • Current state of Home Assistant integration and whether it remains actively maintained
  • Performance and stability under high accessory counts or frequent state changes
  • Specific port and network configuration requirements for AccessoryDriver setup

Package facts

LicenseApache-2.0 permissive
Python supportSupports the current Python release >=3.9
Install frictionLow. Pure-Python wheel
Runtime dependencies
6 packages
async_timeoutcryptographychacha20poly1305-reuseableorjsonzeroconfh11
MaintenanceAging 354 days since the last release
Last repo commit
First released
Downloads88,777 / month, #13,706 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableIntended Audience :: DevelopersIntended Audience :: End Users/DesktopNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9Topic :: Home AutomationTopic :: Software Development :: Libraries :: Python Modules

Evidence: hap_python-5.0.0-py3-none-any.whl

Tags

Capabilities
homekit accessory protocol pythonapple home app integrationsmart home device pythonhomekit python librarylocal network home automationsiri voice control deviceshomekit camera streaming
Topics
homekitsmart-homeasyncio

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “homekit accessory protocol python”

Give your agent the search over MCP, or paste the wish link into any chat.

More Python Modules packages

idna Worth it
PyPI · Python Modules · released Jun 2026

Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.

Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.

BSD-3-Clausepure Python · 3.9+
1.8Bdownloads / mo
setuptools Worth it
PyPI · Python Modules · released Aug 2026

Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.

MITpure Python · 3.10+
1.6Bdownloads / mo
PyYAML Worth it
PyPI · Python Modules · released Sep 2025

PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.

MITcompiled wheel · 3.8+
1.2Bdownloads / mo
pydantic Worth it
PyPI · Python Modules · released May 2026

Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.

MITpure Python · 3.9+
1.1Bdownloads / mo
annotated-types Worth it
PyPI · Python Modules · released Jul 2026

Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.

Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…

MITpure Python · 3.10+
871.3Mdownloads / mo
typing-inspection Worth it
PyPI · Python Modules · released Aug 2026

Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.

MITpure Python · 3.10+
783.0Mdownloads / mo

See also aiohomekit · homeassistant · ha-ffmpeg · pyobjc-framework-ExternalAccessory · airthings-cloud · aioslimproto · pigpio · pyhiveapi · aiohue · pytapo