Skip to main content

Library to access and edit Alexa To-do and Shoppings list through the inofficial Alexa API.

Project description

pyalexatodo

Publish to PyPI GitHub branch check runs GitHub release License issues - pyalexatodo ruff Go to Python website

An unofficial Python library (and optional CLI) for Alexa to-do and shopping lists. API reverse-engineered by intercepting the Alexa mobile app's HTTP traffic.

Disclaimer: This is an unofficial integration and is not created, endorsed, or supported by Amazon.

Features

  • Fetch lists and items (To-Do, Shopping, Custom)
  • Add, remove, rename, and toggle items
  • Optional CLI interface
  • Asynchronous API for integration into other applications

Installation

Install from PyPI:

pip install pyalexatodo

For CLI usage with additional dependencies:

pip install "pyalexatodo[cli]"

CLI Usage

Setup

First, set up your Amazon credentials:

pyalexatodo setup

Commands

 pyalexatodo --help


 Usage: pyalexatodo [OPTIONS] COMMAND [ARGS]...

╭─ Commands ─────────────────────────────────────────────────────────────────────────────╮
│ setup   Command to set up the Alexa Lists CLI with user credentials and preferences.   │
│ list    Fetch and display all items from a specified Alexa list.                       │
│ check   Toggle the checked status of an item in a specified Alexa list.                │
│ add     Add a new item to a specified Alexa list.                                      │
│ remove  Remove an item from a specified Alexa list.                                    │
│ lists   Fetch and display all available Alexa lists.                                   │
╰────────────────────────────────────────────────────────────────────────────────────────╯

Library Usage & API Documentation

See the API documentation for detailed method descriptions.

For are in-depth example including storing of the session information have a look on the cli.py.

Minmal example

import asyncio
from aiohttp import ClientSession
from aioamazondevices.api import AmazonEchoApi
from pyalexatodo.api import AlexaToDoAPI

async def main():
    async with ClientSession() as session:
        # Authenticate with Amazon
        amazon_api = AmazonEchoApi(
            client_session=session,
            login_email="your-email@example.com",
            login_password=input("Enter Password: ")
        )
        await amazon_api.login.login_mode_interactive(input("Enter 2FA code: "))

        # Create To-Do API client
        todo_api = AlexaToDoAPI(amazon_api)

        # Get lists
        lists = await todo_api.get_lists()
        print(f"Available lists: {[list.name for list in lists]}")

        # Add an item
        await todo_api.add_item(lists[0].id, "Buy boba")

        # Get items
        items = await todo_api.get_list_items(lists[0].id)
        print(f"Items: {[i.name for i in items]}")

asyncio.run(main())

Development

Setup

git clone https://github.com/lonlazer/pyalexatodo.git
cd pyalexatodo
uv sync

Testing

uv run pytest

Building

uv build

Contributing

Contributions are welcome! Please follow the conventional commit format prepended by a Gitmoji for commit messages. Make sure everything is formatted using ruff and pytest, ty, ruff checks are passing.

Credits

  • aioamazondevices: This library is used for logging in and making authentified API calls to Amazon.

License

This project is licenced under GNU GENERAL PUBLIC LICENSE Version 3.

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

pyalexatodo-0.1.0.tar.gz (127.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyalexatodo-0.1.0-py3-none-any.whl (25.1 kB view details)

Uploaded Python 3

File details

Details for the file pyalexatodo-0.1.0.tar.gz.

File metadata

  • Download URL: pyalexatodo-0.1.0.tar.gz
  • Upload date:
  • Size: 127.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for pyalexatodo-0.1.0.tar.gz
Algorithm Hash digest
SHA256 89deec9b2db7396759bd3c0077d88b8105fe780f8f5aec33ab735ea511cd9e55
MD5 9b5370488ff312f4bcfd594bb3294901
BLAKE2b-256 afdeceb4b04f3faac58fa951ff3f733341ced42b2e5aaf890c71419c51da3986

See more details on using hashes here.

File details

Details for the file pyalexatodo-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pyalexatodo-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 25.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for pyalexatodo-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6cdffbbea32da8d3915a83a8f99030a042b71bf658c2a7caeb63f3d2d07a5b51
MD5 79324998c011a9e30726aeafd4f67a80
BLAKE2b-256 e97767278f15ac90d0950c973bd9ee6b362cc06515a68e7f35f516dbd0c9cfa6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page