Python SDK
The Python SDK exists because a massive population of Shortcuts-adjacent developers write Python all day and shouldn’t have to learn TypeScript just to ship an App Intent.
Install
pip install axintRequires Python 3.11 or newer. No runtime dependencies — the parser walks the
stdlib ast module and never executes your code, which means axint validate
is deterministic, sandboxable, and safe to run on untrusted input.
Hello, intent
from axint import define_intent, param
create_event = define_intent( name="CreateCalendarEventIntent", title="Create Calendar Event", description="Creates a new event on the user's calendar.", domain="productivity", params={ "event_title": param.string("Title of the event"), "start_date": param.date("When the event starts"), "duration_minutes": param.int("Length of the event in minutes"), "is_all_day": param.boolean( "Whether the event is all-day", optional=True, default=False ), }, entitlements=["com.apple.developer.calendars"], info_plist_keys={ "NSCalendarsUsageDescription": "Create calendar events on your behalf." },)Compile it
axint validate intents/create_event.py # parse + validate, print diagnosticsaxint validate intents/create_event.py --json # IR as JSONaxint compile intents/create_event.py # IR → Swift (native)axint compile generates Swift natively from the Python SDK. The Python and
TypeScript surfaces still target the same Axint contract, but Python no longer
needs a Node.js handoff to get there.
Why stdlib only?
The parser is built on Python’s stdlib ast module. No libcst, no
typed_ast, no third-party runtime deps at all. That’s a deliberate choice:
- Faster install —
pip install axintis a few kilobytes. - Deterministic — the parser never runs your code, so a malicious or broken intent file can’t execute arbitrary Python.
- Sandboxable — you can run
axint validateinside a tiny Docker image with no network access.
Parity with TypeScript
| Feature | TypeScript | Python |
|---|---|---|
define_intent / defineIntent | ✅ | ✅ |
param.string/int/double/... | ✅ | ✅ |
entitlements, info_plist_keys | ✅ | ✅ |
is_discoverable | ✅ | ✅ |
| Multi-intent files | ✅ | ✅ (parse) |
| Swift codegen (native) | ✅ | ✅ |
| Return-type inference | ✅ | ✅ |
| MCP server | ✅ | ✅ |