Keep the model loaded.
Retain models and datasets in a Python worker. Ask for another prediction without starting over.
Persistent objects →Use Python libraries in your Swift app.
Run models, stream results, and share data with Metal.
macOS 15+ · Swift 6 · Python included
Python on iOS
Native CPython and NumPy compute every frame. SwiftUI displays the result. See the recording and the code that drives it.
Watch the demo and read the code →Built for applications
Retain models and datasets in a Python worker. Ask for another prediction without starting over.
Persistent objects →Run heavy work in separate processes. Stream results back into Swift as Python produces them.
Worker pools →Let Python call Swift services. Send input and receive output together. Choose how a job stops.
Duplex sessions →Start small
Import the runtime. Run Python in its executor. Return a Swift value. Move heavier work to a pool when your app needs it.
Read the getting-started guide →import SwiftPythonRuntime
let result: Double = try await Python.run {
let math = try Python.import("math")
return try Double(pythonObject: try math.sqrt(144.0))
}
print(result) // 12.0Made with SwiftPython

Sirius reads the files, runs the commands and shows you every change as a diff — before anything is committed.
See how Sirius works →
SiriusMsg keeps every other chat out of reach, and every reply reports what it could prove.
See how SiriusMsg works →