as general noteusage of ctypes is always going to involve python wrapper layer of varying complexity for exampleit may be the case that you can call function directly howeveryou may also have to implement small wrapping layer to account for certain aspects of the underlying code in this examplethe replace(function is taking extra steps to account for the fact that the library mutates the input buffer the distance(function is performing extra steps to create point instances from tuples and to pass pointers note the ctypes module has large number of advanced features not covered here for examplethe library can access many different kinds of libraries on windowsand there is support for callback functionsincomplete typesand other details the online documentation is filled with many examples so that should be starting point for further use advanced extending and embedding creating handwritten extension modules or using ctypes is usually straightforward if you are extending python with simple code howeverfor anything more complexit can quickly become tedious for thisyou will want to look for suitable extension building tool these tools either automate much of the extension building process or provide programming interface that operates at much higher level links to variety of such tools can be found at howevera short example with swig (by the author with automated toolsyou usually just describe the contents of an extension module at high level for examplewith swigyou write short interface specification that looks like this/example sample swig specification *%module example %/preamble include all required header files here *#include "example %/module contents list all declarations here *typedef struct point double xdouble ypointextern int gcd(intint)extern int replace(char *schar oldchchar newch)extern double distance(point *apoint * )using this specificationswig automatically generates everything needed to make python extension module to run swigyou just invoke it like compilerswig -python example lib fl ff