Skip to content
CAI
Software that uses CAICheck a score

pvieito/PythonKit

66.0

Adequate · 15 November 2026

2.3k

lines of production code

Swift

primary language

5

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

PythonKit is a Swift package that enables native interoperability with Python, allowing Swift code to dynamically load and interact with the Python runtime. It provides an ergonomic API for calling Python functions and classes, along with specific support for converting data between Swift arrays and NumPy ndarrays. The system is maintained as a command-line tool-free library, relying on Swift Package Manager for distribution and testing.

Features

Initial public release of PythonKit under Apache 2.0

This change introduces the initial public release of the PythonKit Swift package, providing a framework to interact with Python from Swift code. The repository is now structured as a public project with an Apache 2.0 license, including documentation (README, AGENTS.md) and configuration files (.gitignore) to support usage via Swift Package Manager and runtime Python library loading.

(repo-wide) · high confidence

Removals

PythonTool CLI removed

The PythonTool command-line interface has been removed from the project. This change deletes the tool's source files (including main.swift, which previously handled argument parsing and Python module listing via CommandLineKit) and its associated configuration files (Info.plist, OperatingSystemVersion.swift), effectively eliminating the standalone CLI capability.

PythonTool · high confidence

Removed Xcode project and workspace files

The Xcode project file (project.pbxproj) and the associated workspace configuration (contents.xcworkspacedata) have been deleted from the repository. This removes the native Xcode build system support for the PythonKit library, indicating a shift away from Xcode-based development or build workflows for this component.

PythonKit.xcodeproj · high confidence

Behavioural changes

The .agents/skills and .claude/skills directories are now symlinks pointing to ../Agents/Skills, centralizing skill definitions. Additionally, placeholder .gitkeep files were added to the Agents/Instructions and Agents/Skills directories to ensure they are tracked by version control.

.agents, .claude, Agents · high confidence

PythonKit rewritten with native Swift interoperability and NumPy support

The PythonKit library has been completely rewritten to provide a native Swift interoperability layer for Python, replacing the previous \PythonGlue\ implementation. The new \Python.swift\ core introduces \PythonObject\ with \@dynamicMemberLookup\ and \@dynamicCallable\ for ergonomic Python interaction, and \PythonLibrary.swift\ implements robust runtime dynamic loading of the Python library across macOS, Linux, and Windows. Additionally, the new \NumpyConversion.swift\ file adds support for bridging \numpy.ndarray\ data to and from Swift arrays, enabling seamless integration with the NumPy ecosystem.

PythonKit · high confidence

Test coverage

Added test coverage for Numpy conversion, Python functions, and runtime behavior

Added new test suites in the Tests directory to verify core PythonKit functionality. NumpyConversionTests validates the conversion between Swift arrays and NumPy arrays, including handling of different data types, empty arrays, and strided views. PythonFunctionTests exercises the creation of Python functions and classes from Swift closures, covering keyword arguments, dynamic class construction, inheritance, and exception handling. PythonRuntimeTests ensures correct behavior of the Python runtime integration, including list and dictionary operations, range and slice handling, binary/unary operators, and error throwing.

Tests · high confidence

Dependencies

Swift Package Manifest Updated to Swift 6.0 and Swift 5 Language Mode

The Package.swift manifest has been updated to specify Swift tools version 6.0 while explicitly setting the language mode to Swift 5 via the \swiftLanguageModes\ configuration. This ensures compatibility with the newer Swift Package Manager tooling while maintaining source compatibility with Swift 5 code.

(dependencies) · high confidence

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 66 → 66 (-0.1)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.4) — scores are not directly comparable.

Lenses

  • Code Health 99 → 98 (-0.5)
  • Architecture 100 → 100 (+0.0)
  • Maturity 54 → 54 (+0.0)
  • Readiness 55 → 54 (-0.1)
  • Security 97 → 97 (+0.0)

New (1)

  • Edited copies of one member (3 members, 9+ corresponding lines) (PythonKit/Python.swift)

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

pvieito/PythonKit was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 15 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit fe7d97334600b0fc11fbef5e0525f93eaa68ef7e — the exact code this score is about.
  • Scored under rubric-2026.11.4 — the same rubric and the same method as every other entry in this index.
  • Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.65+preprod-3c33c1882dc1.