Swift API¶
This is the Swift API for the PytoRuntime Swift library.
It contains the necessary tools for executing, debugging and extending multiple Python environments in a single process.
import PytoRuntime
Documents¶
Interpreter¶
Types related to the Interpreter class for loading Python, running and debugging scripts.
Holds configurations, context and debugging tools for scripts execution.
A Python version.
Represents a breakpoint.
A script to run with run(_:with:enableBreakpoints:).
Represents a Python exception.
A serialized traceback.
Interopability¶
Types related to Object providing interopability between Python objects and Swift types.
Represents a Python object.
Interface for converting Python objects to and from Swift types.
Extensions¶
Types for extending Python with modules defined in Swift.
Call register(extension:) to register a Module type and make it importable.
Methods
Exposing Swift funtions.
Represents the definition of a Python method.
A Swift function callable from Python.
Contains the arguments passed to a Method and an interface to parse them into Swift values.
A collection of signature components that define a function’s parameters and return type.
A component of a function signature, representing a parameter or a return value.
Members
Other members.
Implements the definition of a Python attribute.
Protocol for implementing module definitions.
A stored attribute in a class or module.
Protocol for implementing class definitions.
Represents the definition of a computed property.
WebAssembly¶
Classes for the WebAssembly runtime. See WebAssembly Runtime for more details.
This class represents a WebAssembly process. It is used to instantiate modules.
The state of a WASI virtual machine.
Package Manager¶
APIs for the package manager. See Package Manager for more details.
A package installer.
Package uninstaller.
A package in a registry.
A package dependency.