Python SDK for Axint — define Apple App Intents, Views, Widgets, and Apps in Python.
Project description
axint — Python SDK for Axint
Define Apple App Intents, SwiftUI views, WidgetKit widgets, and full apps in Python. Compile to native Swift through the same open-source compiler pipeline that powers the TypeScript SDK.
The Python SDK includes a native Swift generator — no Node.js dependency required. Parse, validate, and compile entirely from Python.
Install
pip install axint
Or install from source for development:
git clone https://github.com/agenticempire/axint.git
cd axint/python
pip install -e '.[dev]'
Define an 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"],
)
Compile it
# Parse and inspect the IR
axint parse intents/create_event.py
axint parse intents/create_event.py --json
# Compile Python → Swift (native, no Node.js needed)
axint compile intents/create_event.py --stdout
axint compile intents/create_event.py --out ios/Intents/
# With companion fragments
axint compile intents/create_event.py --out ios/Intents/ --emit-info-plist --emit-entitlements
# Validate without generating Swift
axint validate intents/create_event.py
# Machine-readable output
axint compile intents/create_event.py --json
Use it as a library
from axint import define_intent, param, generate_swift, validate_intent
intent = define_intent(
name="SendMessage",
title="Send Message",
description="Sends a message",
domain="messaging",
params={"body": param.string("Message text")},
)
ir = intent.to_ir()
diagnostics = validate_intent(ir)
swift_code = generate_swift(ir)
Cross-language bridge
The Python SDK produces compatible IR JSON that the TypeScript compiler can consume. You can pipe it in for additional validation and Swift generation:
axint parse intent.py --json | axint compile - --from-ir --stdout
Why Python?
Every language-agnostic analysis layer in Axint — the IR, the validator, the generator — works with a stable JSON schema. The Python SDK implements the full pipeline natively, unlocking a massive population of developers who shouldn't have to learn TypeScript to build Siri integrations.
The Python parser never runs your code. It walks the Python AST the same way the TypeScript compiler walks the TS AST, so axint compile is deterministic, sandboxable, and reproducible.
Parity with the TypeScript SDK
| Feature | TypeScript | Python |
|---|---|---|
define_intent / defineIntent |
✅ | ✅ |
param.string/int/double/... |
✅ | ✅ |
entitlements, infoPlistKeys |
✅ | ✅ |
isDiscoverable |
✅ | ✅ |
| Multi-intent files | ✅ | ✅ |
| Swift codegen (native) | ✅ | ✅ |
| IR validation | ✅ | ✅ |
| Info.plist fragment | ✅ | ✅ |
| Entitlements fragment | ✅ | ✅ |
| CLI (parse/compile/validate) | ✅ | ✅ |
| Return-type inference | ✅ | 🟡 v0.3 |
| MCP server | ✅ | 🟡 v0.3 |
Development
pip install -e '.[dev]'
pytest -v
ruff check .
mypy axint
License
Apache 2.0 — see LICENSE.
Part of the Axint project by Agentic Empire.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file axint-0.3.7.tar.gz.
File metadata
- Download URL: axint-0.3.7.tar.gz
- Upload date:
- Size: 48.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4aadeacb433496640c9c8557af50a8fbed5338e810cc5e42c31ef43fefae96d5
|
|
| MD5 |
d767bd75332a093e5595628d7530d497
|
|
| BLAKE2b-256 |
941babf82ba5263b92b0de0b32b5aae30e42e37a44f79e735b71baa4eedf6e09
|
File details
Details for the file axint-0.3.7-py3-none-any.whl.
File metadata
- Download URL: axint-0.3.7-py3-none-any.whl
- Upload date:
- Size: 44.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fda79b36163cd4f9ea019a9510de22d2221b15a7337c09171726b7216215a43a
|
|
| MD5 |
547f7690e6860f9dae217f3879b26821
|
|
| BLAKE2b-256 |
4b9f6af143c6826d9beb8c16d3fb172435723022b9dc4711b99874de4c048a72
|