SQLite Forum

Any examples of writing a loadable extension in Python?
> I believe loadable extensions are faster than user defined functions

Why would you believe that? if written in the same way and compiled with the same settings, they probably are very much equal.

> Any examples of writing one, in Python?

Ah. Everything in Python is slower. Python's power lies in its simplicity and abstraction, not its speed.

Not sure you can write a loadable extension in Python. It typically requires being able to compile the extended functions into a dynlib of sorts (.so/.dyn/.dll) with correct entry points to load into sqlite, and although this may well be possible with Python, I have never seen it or know how to do it.

Writing custom functions in Python for the loaded sqlite connection is however easy, but you'd have better luck checking the Python forums for that.