Skip to content

gmcheese/wrap-swift-python

Repository files navigation

Wrap Swift for Python

A small example project showing how to wrap Swift code for Python.

For a full tutorial, see my post here

Setup

Clone the repository, and open Terminal at the project directory.

In an environment with Python 3.10 activated, run:

pip install -e .

You can now import the module from Python:

from mymodule import add
# This will call the Swift function
add(2, 2)
>> 4

About

A simple example for creating python bindings for swift code

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published