Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
113 changes: 113 additions & 0 deletions .github/workflows/python-sdk.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
name: Python SDK

on:
push:
paths:
- 'sdk/python/**'
- '.github/workflows/python-sdk.yml'
pull_request:
paths:
- 'sdk/python/**'

defaults:
run:
working-directory: sdk/python

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: Install dependencies
run: |
pip install -e ".[dev]"

- name: Run Ruff linter
run: ruff check .

- name: Run Ruff formatter check
run: ruff format --check .

- name: Run MyPy
run: mypy axonflow

test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: pip install -e ".[dev,all]"

- name: Run tests
run: pytest --cov-report=xml --cov-fail-under=90

- name: Upload coverage
if: matrix.python-version == '3.11'
uses: codecov/codecov-action@v3
with:
files: ./sdk/python/coverage.xml
flags: python-sdk

build:
runs-on: ubuntu-latest
needs: [lint, test]
steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: Install build tools
run: pip install build

- name: Build package
run: python -m build

- name: Check package
run: |
pip install twine
twine check dist/*

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: python-sdk-dist
path: sdk/python/dist/

publish:
needs: [build]
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/python-sdk-v')
runs-on: ubuntu-latest
environment: pypi
permissions:
id-token: write
steps:
- uses: actions/checkout@v4

- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: python-sdk-dist
path: dist/

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: dist/
34 changes: 34 additions & 0 deletions sdk/python/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Changelog

All notable changes to the AxonFlow Python SDK will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.1.0] - 2025-12-04

### Added

- Initial release of AxonFlow Python SDK
- Async-first client with sync wrappers
- Full type hints with Pydantic v2 models
- Gateway Mode support for lowest-latency LLM calls
- `get_policy_approved_context()` for pre-checks
- `audit_llm_call()` for compliance logging
- OpenAI interceptor for transparent governance
- Anthropic interceptor for transparent governance
- MCP connector operations
- `list_connectors()`
- `install_connector()`
- `query_connector()`
- Multi-agent planning
- `generate_plan()`
- `execute_plan()`
- `get_plan_status()`
- Comprehensive exception hierarchy
- Response caching with TTL
- Retry logic with exponential backoff
- Structured logging with structlog
- 95%+ test coverage
- mypy strict mode compatible
- ruff linting compatible
Loading
Loading