Sample extension package for Python written in C
C 62.0%
Python 37.3%
Other 0.7%
2 1 0

Clone this repository

https://tangled.org/jsalvador.me/ctypes-hello-world https://tangled.org/did:plc:fh3za5kcmoktispugmkzefcf/ctypes-hello-world
git@tangled.org:jsalvador.me/ctypes-hello-world git@tangled.org:did:plc:fh3za5kcmoktispugmkzefcf/ctypes-hello-world

For self-hosted knots, clone URLs may differ based on your setup.

Download tar.gz
README.md

Ctypes Hello World#

This is an example of how to make your own Python extensions with C.

To build the package.

cd libhello
uv run python setup.py build
uv run python setup.py install

To run the example code.

uv run python main.py