C API
The Smisk C API provides direct access to the underlying C extension internals. This is intended for advanced use cases where you need to extend Smisk at the C level or embed it in another C application.
Most users do not need to interact with the C API directly — use the smisk.core Python module instead.
Core Types
SmiskApplication-
The core application C struct. Corresponds to
smisk.core.Applicationin Python.Field Type Description ob_basePyObjectPython object header requestSmiskRequest*Current request object responseSmiskResponse*Current response object SmiskRequestRepresents an incoming FastCGI request at the C level. Wraps the
FCGX_Requeststruct.SmiskResponseRepresents the outgoing HTTP response. Provides a write buffer and header management at the C level.
Functions
int smisk_application_run(SmiskApplication *self)-
Enter the FastCGI accept loop. Returns 0 on clean shutdown.
Parameter Description selfThe application instance int smisk_response_write(SmiskResponse *self, const char *data, Py_ssize_t length)Write raw bytes to the response buffer.
Building against the C API
Include the Smisk headers in your extension:
#include <smisk/core.h>
Link against the smisk.core shared library. The header files are installed to the Python include directory under smisk/.