Skip to main content

Python SDK for Axint — define Apple App Intents in Python, ship to Siri.

Project description

axintai — Python SDK for Axint

Python 3.11+ License: Apache-2.0

Define Apple App Intents in Python. Ship them to Siri, Shortcuts, and Spotlight 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 intents entirely from Python.

Install

Note: The PyPI package is not published yet. Install from source for now:

git clone https://github.com/agenticempire/axint.git
cd axint/python
pip install -e '.[dev]'

Define an intent

from axintai 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
axintai parse intents/create_event.py
axintai parse intents/create_event.py --json

# Compile Python → Swift (native, no Node.js needed)
axintai compile intents/create_event.py --stdout
axintai compile intents/create_event.py --out ios/Intents/

# With companion fragments
axintai compile intents/create_event.py --out ios/Intents/ --emit-info-plist --emit-entitlements

# Validate without generating Swift
axintai validate intents/create_event.py

# Machine-readable output
axintai compile intents/create_event.py --json

Use it as a library

from axintai 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:

axintai 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 axintai 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 axintai

License

Apache 2.0 — see LICENSE.

Part of the Axint project by Agentic Empire.

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

axintai-0.1.0.tar.gz (17.7 kB view details)

Uploaded Source

Built Distribution

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

axintai-0.1.0-py3-none-any.whl (17.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: axintai-0.1.0.tar.gz
  • Upload date:
  • Size: 17.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for axintai-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d05044db05c1b16563f6c97ec41e0c406a47ba682d883036d1f99acae8cabe8b
MD5 e7ac5d2237daa878924354724150f9c4
BLAKE2b-256 a3fa6b5490a2ec8229499cd833823da1a661690208d0592b0a25b6c5b195a7da

See more details on using hashes here.

File details

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

File metadata

  • Download URL: axintai-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 17.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for axintai-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4773b2adc65881b7c565e722921216c6928c82acfe976964f9c279c1a4cdceea
MD5 c556fdce0a0cee0408d4ce97819ae563
BLAKE2b-256 387486419ae5fc66893667bb5f7c0cfb47189eacb7b5cf1f51512ebd67ef8b5c

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