Cinpy is a Python library that allows you to implement functions with C in Python modules. Inlined C code is compiled with tcc (Tiny C Compiler) at runtime. The results are made callable in Python with ctypes library.
C. Bolz, A. Cuni, M. Fijalkowski, and A. Rigo. Proceedings of the 4th Workshop on the Implementation, Compilation, Optimization of Object-Oriented Languages and Programming Systems, page 18--25. ACM, (2009)