<commit_before>## vtfunc

**NOTICE**: This project is no longer necessary if you are using Peewee 3.0 or
newer, as the relevant code has been included in Peewee's sqlite extension
module. For more information, see:

* [Peewee user-defined function examples](http://docs.peewee-orm.com/en/latest/peewee/database.html#user-defined-functions)
* [TableFunction API documentation](http://docs.peewee-orm.com/en/latest/peewee/sqlite_ext.html#TableFunction)
* [Table function registration API](http://docs.peewee-orm.com/en/latest/peewee/api.html#SqliteDatabase.table_function)
* [General SQLite extensions documentation](http://docs.peewee-orm.com/en/latest/peewee/sqlite_ext.html)

If you intend to use this project with an older version of Peewee, or as a
standalone project with the standard library SQLite module, feel free to
continue using this repository.

--------------------------------------------------------------------------

Python bindings for the creation of [table-valued functions](http://sqlite.org/vtab.html#tabfunc2)
in SQLite.

A table-valued function:

* Accepts any number of parameters
* Can be used in places you would put a normal table or subquery, such as the
  `FROM` clause or on the right-hand-side of an `IN` expression.
* may return an arbitrary number of rows consisting of one or more columns.

Here are some examples of what you can do with Python and `sqlite-vtfunc`:

* Write a SELECT query that, when run, will scrape a website and return a table
  of all the outbound links on the page (rows are `(href, description)`
  tuples. [See example below](#scraping-pages-with-sql)).<commit_msg>Add minimum version note.<commit_after>## vtfunc

**NOTICE**: This project is no longer necessary if you are using Peewee 3.0 or
newer, as the relevant code has been included in Peewee's sqlite extension
module. For more information, see:

* [Peewee user-defined function examples](http://docs.peewee-orm.com/en/latest/peewee/database.html#user-defined-functions)
* [TableFunction API documentation](http://docs.peewee-orm.com/en/latest/peewee/sqlite_ext.html#TableFunction)
* [Table function registration API](http://docs.peewee-orm.com/en/latest/peewee/api.html#SqliteDatabase.table_function)
* [General SQLite extensions documentation](http://docs.peewee-orm.com/en/latest/peewee/sqlite_ext.html)

If you intend to use this project with an older version of Peewee, or as a
standalone project with the standard library SQLite module, feel free to
continue using this repository.

Requires sqlite >= 3.9.0

--------------------------------------------------------------------------

Python bindings for the creation of [table-valued functions](http://sqlite.org/vtab.html#tabfunc2)
in SQLite.

A table-valued function:

* Accepts any number of parameters
* Can be used in places you would put a normal table or subquery, such as the
  `FROM` clause or on the right-hand-side of an `IN` expression.
* may return an arbitrary number of rows consisting of one or more columns.

Here are some examples of what you can do with Python and `sqlite-vtfunc`:

* Write a SELECT query that, when run, will scrape a website and return a table
  of all the outbound links on the page (rows are `(href, description)`
  tuples. [See example below](#scraping-pages-with-sql)).
{'fraction_non_alphanumeric': 0.13246041412911083, 'fraction_numerical': 0.0027405602923264312, 'mean_word_length': 3.7198275862068964, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3760547', 'n_tokens_mistral': 973, 'n_tokens_neox': 932, 'n_words': 365}