skillfed

AlexaPy

Python API to control Amazon Echo Devices Programmatically.

alexapy v1.30.0 672.7K downloads/30d#5,400 on PyPI
Permissive license Apache-2.0 Active released

What it is and what it does

alexapy is a Python library for controlling Amazon Echo and Alexa devices programmatically without an official Amazon API. It was originally built to power the alexa_media_player custom component for Home Assistant, allowing developers to automate Echo devices, query their state, and integrate them into broader home automation workflows.

The library handles authentication, device discovery, and command execution through reverse-engineered Alexa endpoints. It uses aiohttp for async HTTP communication, cryptography for secure operations, and beautifulsoup4 for parsing responses. Because it relies on undocumented endpoints rather than an official API, functionality may break when Amazon changes their service—this is a known and documented limitation.

Use it for:

  • Automate Echo device control in Home Assistant or other home automation platforms
  • Build scripts to query Alexa device state and trigger actions programmatically
  • Integrate Alexa devices into custom Python applications that need device discovery and control
  • Create voice-triggered workflows that respond to Alexa commands via this library

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

alexapy provides programmatic control of Amazon Echo and Alexa devices through Python, enabling automation and integration with home automation systems.

Yes, if you need programmatic Alexa control and accept the risk that undocumented API endpoints may break. Active maintenance, low install friction, and permissive licensing make it suitable for Home Assistant integrations and home automation projects. Not recommended for production systems requiring guaranteed stability.

Install

alexapy on PyPI

pip

pip install alexapy

uv

uv add alexapy

poetry

poetry add alexapy

Installing AlexaPy

Before you install

Low install friction with a pure-wheel distribution. Active maintenance as of 23 days ago. Depends on 12 runtime packages including aiohttp, requests, and cryptography for async and secure communication.

License in practice

Licensed under Apache-2.0 (permissive), allowing commercial and private use with minimal restrictions.

Quickstart

pip install alexapy

import asyncio
from alexapy import AlexaAPI

async def main():
    alexa = AlexaAPI()
    # Requires Amazon credentials and device setup
    await alexa.login()

asyncio.run(main())

Requires valid Amazon account credentials and an active Alexa device; no official API means authentication method may change without notice.

Verify before relying

  • Stability and reliability given that Alexa has no official API and the library may break without warning
  • Current feature completeness and which Alexa device types are fully supported
  • Whether authcaptureproxy dependency is a custom or third-party package and its maintenance status

Package facts

License Apache-2.0 (permissive)
Python support supports the current Python release (<4,>=3.11)
Install friction low — pure-Python wheel
Runtime dependencies 12 — aiofiles, aiohttp, authcaptureproxy, backoff, beautifulsoup4, certifi, cryptography, httpx, pyotp, requests, simplejson, yarl
Maintenance actively maintained — 23 days since the last release
First released
Downloads 672,721/month — #5,400 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: alexapy-1.30.0-py3-none-any.whl

Keywords: amazon, alexa, homeassistant

License :: OSI Approved :: Apache Software LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14

Tags

alexa device control pythonecho automation libraryamazon alexa api pythonhome assistant alexa integrationprogrammatic echo control
home-automationalexa-controlreverse-engineered-api

More Internet packages