{"id":14563689,"url":"https://github.com/asg017/sqlite-ecosystem","last_synced_at":"2025-05-09T00:04:58.516Z","repository":{"id":152046708,"uuid":"624978362","full_name":"asg017/sqlite-ecosystem","owner":"asg017","description":"An overview of all my SQLite extensions, and a roadmap for future extensions and tooling!","archived":false,"fork":false,"pushed_at":"2023-08-06T02:27:05.000Z","size":35,"stargazers_count":252,"open_issues_count":27,"forks_count":3,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-05-09T00:04:49.346Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/asg017.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-04-07T18:37:17.000Z","updated_at":"2025-04-28T14:29:27.000Z","dependencies_parsed_at":null,"dependency_job_id":"a446889b-92be-4c69-9b79-c14ffc9442ee","html_url":"https://github.com/asg017/sqlite-ecosystem","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asg017%2Fsqlite-ecosystem","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asg017%2Fsqlite-ecosystem/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asg017%2Fsqlite-ecosystem/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asg017%2Fsqlite-ecosystem/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/asg017","download_url":"https://codeload.github.com/asg017/sqlite-ecosystem/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253166514,"owners_count":21864475,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-09-07T02:04:20.707Z","updated_at":"2025-05-09T00:04:58.489Z","avatar_url":"https://github.com/asg017.png","language":"TypeScript","readme":"\n\n# sqlite-ecosystem\n\nAll the SQLite extensions, tools, and guides that I (Alex Garcia 👋🏼) have written and open sourced.\n\nFeel free to start a discussion in this repo about meta-level SQLite extension and tooling talk! Though if you're having a specific issue with a particular extension or tool, then file an issue in that project's repository.\n\n## Overview\n\nThese are all the loadable SQLite extensions I have built, along with which programming language they are written in and where they are distributed.\n\n| Extension                                 | Description                            | Language | Python  | Node.js  | Deno  | Ruby | Datasette  | sqlite-utils |\n| ----------------------------------------- | -------------------------------------- | -------- | :--: | :--: | :---: | :--: | :-------: | :-----: |\n| [`sqlite-http`](#sqlite-http)             | Make HTTP requests                     | Go       |  ✅  |  ✅  |  ✅    |  ✅  |     ✅      | ✅ |\n| [`sqlite-html`](#sqlite-html)             | parse HTML documents                   | Go       |  ✅  |  ✅  |  ✅    |  ✅  |     ✅      | ✅ |\n| [`sqlite-lines`](#sqlite-lines)           | Read files/blob line-by-line           | C        |  ✅  |  ✅  |  ✅    |  ✅  |     ✅      | ✅ |\n| [`sqlite-path`](#sqlite-path)             | Parse and generate filepaths           | C        |  ✅  |  ✅  |  ✅    |  ✅  |     ✅      | ✅ |\n| [`sqlite-url`](#sqlite-url)               | Parse and generate URLs                | C        |  ✅  |  ✅  |  ✅    |  ✅  |     ✅      | ✅ |\n| [`sqlite-xsv`](#sqlite-xsv)               | Query CSVs                             | Rust     |  ✅  |  ✅  |  ✅    |  ✅  |     🚧      | 🚧 |\n| [`sqlite-regex`](#sqlite-regex)           | Regular expression functions           | Rust     |  ✅  |  ✅  |  ✅    |  ✅  |     ✅      | ✅ |\n| [`sqlite-ulid`](#sqlite-ulid)             | Work with ULIDs                        | Rust     |  ✅  |  ✅  |  ✅    |  ✅  |     ✅      | ✅ |\n| [`sqlite-jsonschema`](#sqlite-jsonschema) | Validate JSON objects with JSON Schema | Rust     |  ✅  |  ✅  |  ✅    |  ✅  |     ✅      | ✅ |\n| [`sqlite-fastrand`](#sqlite-fastrand)     | Generate fast numbers/blobs quickly    | Rust     |  ✅  |  ✅  |  ✅    |  ✅  |     ✅      | ✅ |\n| [`sqlite-vss`](#sqlite-vss)               | Vector search in SQLite                | C++      |  ✅  |  ✅  |  ✅    |  ✅  |     ✅      | ✅ |\n\n\n## Extensions\n\n\n\n\n\n\n### [`sqlite-http`](https://github.com/asg017/sqlite-http)\n\n\nA SQLite extension for making HTTP requests purely in SQL.\n\n- Create GET, POST, and other HTTP requests, like curl, wget, and fetch\n- Download response bodies, header, status codes, timing info\n- Set rate limits, timeouts\n\n```sql\nselect http_get_body('https://text.npr.org/');\nselect\n  http_get_body('https://api.github.com/repos/sqlite/sqlite') -\u003e\u003e '$.description';\n```\n\n\n\n\n | Language/Platform | Install                                    |                                                                                                                                                                                      |\n| ----------------- | ------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |\n| Python            | `pip install sqlite-http`                 | [![PyPI](https://img.shields.io/pypi/v/sqlite-http.svg?color=blue\u0026logo=python\u0026logoColor=white)](https://pypi.org/project/sqlite-http/)                                             |\n| Node.js           | `npm install sqlite-http`                 | [![npm](https://img.shields.io/npm/v/sqlite-http.svg?color=green\u0026logo=nodedotjs\u0026logoColor=white)](https://www.npmjs.com/package/sqlite-http)                                       |\n| Deno              | [`deno.land/x/sqlite_http`](https://deno.land/x/sqlite_http)           | [![deno.land/x release](https://img.shields.io/github/v/release/asg017/sqlite-http?color=fef8d2\u0026include_prereleases\u0026label=deno.land%2Fx\u0026logo=deno)](https://deno.land/x/sqlite_http)                                                                       |\n| [Datasette](https://datasette.io/)         | `datasette install datasette-sqlite-http` | [![PyPI](https://img.shields.io/pypi/v/datasette-sqlite-http.svg?color=B6B6D9\u0026label=Datasette+plugin\u0026logoColor=white\u0026logo=python)](https://pypi.org/project/datasette-sqlite-http) |\n| [sqlite-utils](https://sqlite-utils.datasette.io/)         | `sqlite-utils install sqlite-utils-sqlite-http` | [![PyPI](https://img.shields.io/pypi/v/sqlite-utils-sqlite-http.svg?color=B6B6D9\u0026label=sqlite-utils+plugin\u0026logoColor=white\u0026logo=python)](https://pypi.org/project/sqlite-utils-sqlite-http) |\n| Ruby              | `gem install sqlite-http`                 | ![Gem](https://img.shields.io/gem/v/sqlite-http?color=red\u0026logo=rubygems\u0026logoColor=white)                                                                                                  |\n| Github Release    |                                            | ![GitHub tag (latest SemVer pre-release)](https://img.shields.io/github/v/tag/asg017/sqlite-http?color=lightgrey\u0026include_prereleases\u0026label=Github+release\u0026logo=github)\n\n\n\n- `linux-x86_64` (Linux x86_64)\n- `macos-x86_64` (MacOS x86_64)\n- `macos-aarch64` (MacOS M1 and M2 chips)\n- `windows-x86_64` (Windows x86_64)\n\n\n\n\n\n\n### [`sqlite-html`](https://github.com/asg017/sqlite-html)\n\n\nA SQLite extension for querying, manipulating, and creating HTML elements.\n\n- Extract HTML or text from HTML with CSS selectors, like `.querySelector()`, `.innerHTML`, and `.innerText`\n- Generate a table of matching elements from a CSS selector, like `.querySelectorAll()`\n- Safely create HTML elements in a query, like .createElement() and `.appendChild()`\n\n```sql\nselect html_extract('\u003cp\u003e Anakin \u003cb\u003eSkywalker\u003c/b\u003e \u003c/p\u003e', 'b'); -- \"\u003cb\u003eSkywalker\u003c/b\u003e\"\n```\n\n\n\n\n | Language/Platform | Install                                    |                                                                                                                                                                                      |\n| ----------------- | ------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |\n| Python            | `pip install sqlite-html`                 | [![PyPI](https://img.shields.io/pypi/v/sqlite-html.svg?color=blue\u0026logo=python\u0026logoColor=white)](https://pypi.org/project/sqlite-html/)                                             |\n| Node.js           | `npm install sqlite-html`                 | [![npm](https://img.shields.io/npm/v/sqlite-html.svg?color=green\u0026logo=nodedotjs\u0026logoColor=white)](https://www.npmjs.com/package/sqlite-html)                                       |\n| Deno              | [`deno.land/x/sqlite_html`](https://deno.land/x/sqlite_html)           | [![deno.land/x release](https://img.shields.io/github/v/release/asg017/sqlite-html?color=fef8d2\u0026include_prereleases\u0026label=deno.land%2Fx\u0026logo=deno)](https://deno.land/x/sqlite_html)                                                                       |\n| [Datasette](https://datasette.io/)         | `datasette install datasette-sqlite-html` | [![PyPI](https://img.shields.io/pypi/v/datasette-sqlite-html.svg?color=B6B6D9\u0026label=Datasette+plugin\u0026logoColor=white\u0026logo=python)](https://pypi.org/project/datasette-sqlite-html) |\n| [sqlite-utils](https://sqlite-utils.datasette.io/)         | `sqlite-utils install sqlite-utils-sqlite-html` | [![PyPI](https://img.shields.io/pypi/v/sqlite-utils-sqlite-html.svg?color=B6B6D9\u0026label=sqlite-utils+plugin\u0026logoColor=white\u0026logo=python)](https://pypi.org/project/sqlite-utils-sqlite-html) |\n| Ruby              | `gem install sqlite-html`                 | ![Gem](https://img.shields.io/gem/v/sqlite-html?color=red\u0026logo=rubygems\u0026logoColor=white)                                                                                                  |\n| Github Release    |                                            | ![GitHub tag (latest SemVer pre-release)](https://img.shields.io/github/v/tag/asg017/sqlite-html?color=lightgrey\u0026include_prereleases\u0026label=Github+release\u0026logo=github)\n\n\n\n- `linux-x86_64` (Linux x86_64)\n- `macos-x86_64` (MacOS x86_64)\n- `macos-aarch64` (MacOS M1 and M2 chips)\n- `windows-x86_64` (Windows x86_64)\n\n\n\n\n\n\n### [`sqlite-lines`](https://github.com/asg017/sqlite-lines)\n\n\nA SQLite extension for efficiently reading large files or blobs line-by-line.\n\n```sql\nselect line from lines_read('logs.txt');\n```\n\n\n\n\n | Language/Platform | Install                                    |                                                                                                                                                                                      |\n| ----------------- | ------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |\n| Python            | `pip install sqlite-lines`                 | [![PyPI](https://img.shields.io/pypi/v/sqlite-lines.svg?color=blue\u0026logo=python\u0026logoColor=white)](https://pypi.org/project/sqlite-lines/)                                             |\n| Node.js           | `npm install sqlite-lines`                 | [![npm](https://img.shields.io/npm/v/sqlite-lines.svg?color=green\u0026logo=nodedotjs\u0026logoColor=white)](https://www.npmjs.com/package/sqlite-lines)                                       |\n| Deno              | [`deno.land/x/sqlite_lines`](https://deno.land/x/sqlite_lines)           | [![deno.land/x release](https://img.shields.io/github/v/release/asg017/sqlite-lines?color=fef8d2\u0026include_prereleases\u0026label=deno.land%2Fx\u0026logo=deno)](https://deno.land/x/sqlite_lines)                                                                       |\n| [Datasette](https://datasette.io/)         | `datasette install datasette-sqlite-lines` | [![PyPI](https://img.shields.io/pypi/v/datasette-sqlite-lines.svg?color=B6B6D9\u0026label=Datasette+plugin\u0026logoColor=white\u0026logo=python)](https://pypi.org/project/datasette-sqlite-lines) |\n| [sqlite-utils](https://sqlite-utils.datasette.io/)         | `sqlite-utils install sqlite-utils-sqlite-lines` | [![PyPI](https://img.shields.io/pypi/v/sqlite-utils-sqlite-lines.svg?color=B6B6D9\u0026label=sqlite-utils+plugin\u0026logoColor=white\u0026logo=python)](https://pypi.org/project/sqlite-utils-sqlite-lines) |\n| Ruby              | `gem install sqlite-lines`                 | ![Gem](https://img.shields.io/gem/v/sqlite-lines?color=red\u0026logo=rubygems\u0026logoColor=white)                                                                                                  |\n| Github Release    |                                            | ![GitHub tag (latest SemVer pre-release)](https://img.shields.io/github/v/tag/asg017/sqlite-lines?color=lightgrey\u0026include_prereleases\u0026label=Github+release\u0026logo=github)\n\n\n\n- `linux-x86_64` (Linux x86_64)\n- `macos-x86_64` (MacOS x86_64)\n- `macos-aarch64` (MacOS M1 and M2 chips)\n\n\n\n\n\n\n### [`sqlite-path`](https://github.com/asg017/sqlite-path)\n\n\nA SQLite extension for parsing, generating, and querying paths.\n\n```sql\nselect path_dirname('foo/bar.txt'); -- 'foo/'\nselect path_basename('foo/bar.txt'); -- 'bar.txt'\nselect path_extension('foo/bar.txt'); -- '.txt'\n```\n\n\n\n\n | Language/Platform | Install                                    |                                                                                                                                                                                      |\n| ----------------- | ------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |\n| Python            | `pip install sqlite-path`                 | [![PyPI](https://img.shields.io/pypi/v/sqlite-path.svg?color=blue\u0026logo=python\u0026logoColor=white)](https://pypi.org/project/sqlite-path/)                                             |\n| Node.js           | `npm install sqlite-path`                 | [![npm](https://img.shields.io/npm/v/sqlite-path.svg?color=green\u0026logo=nodedotjs\u0026logoColor=white)](https://www.npmjs.com/package/sqlite-path)                                       |\n| Deno              | [`deno.land/x/sqlite_path`](https://deno.land/x/sqlite_path)           | [![deno.land/x release](https://img.shields.io/github/v/release/asg017/sqlite-path?color=fef8d2\u0026include_prereleases\u0026label=deno.land%2Fx\u0026logo=deno)](https://deno.land/x/sqlite_path)                                                                       |\n| [Datasette](https://datasette.io/)         | `datasette install datasette-sqlite-path` | [![PyPI](https://img.shields.io/pypi/v/datasette-sqlite-path.svg?color=B6B6D9\u0026label=Datasette+plugin\u0026logoColor=white\u0026logo=python)](https://pypi.org/project/datasette-sqlite-path) |\n| [sqlite-utils](https://sqlite-utils.datasette.io/)         | `sqlite-utils install sqlite-utils-sqlite-path` | [![PyPI](https://img.shields.io/pypi/v/sqlite-utils-sqlite-path.svg?color=B6B6D9\u0026label=sqlite-utils+plugin\u0026logoColor=white\u0026logo=python)](https://pypi.org/project/sqlite-utils-sqlite-path) |\n| Ruby              | `gem install sqlite-path`                 | ![Gem](https://img.shields.io/gem/v/sqlite-path?color=red\u0026logo=rubygems\u0026logoColor=white)                                                                                                  |\n| Github Release    |                                            | ![GitHub tag (latest SemVer pre-release)](https://img.shields.io/github/v/tag/asg017/sqlite-path?color=lightgrey\u0026include_prereleases\u0026label=Github+release\u0026logo=github)\n\n\n\n- `linux-x86_64` (Linux x86_64)\n- `macos-x86_64` (MacOS x86_64)\n- `macos-aarch64` (MacOS M1 and M2 chips)\n- `windows-x86_64` (Windows x86_64)\n\n\n\n\n\n\n### [`sqlite-url`](https://github.com/asg017/sqlite-url)\n\n\nA SQLite extension for parsing, generating, and querying URLs and query strings\n\n- Extract specific parts of a URL, like schemes, hostnames, and paths\n- Generate URLs with parts safely\n- Iterate through all key and values in a query string\n\n```sql\nselect url_valid('https://sqlite.org'); -- 1\nselect url_scheme('https://www.sqlite.org/vtab.html#usage'); -- 'https'\nselect url_host('https://www.sqlite.org/vtab.html#usage'); -- 'www.sqlite.org'\n```\n\n\n\n\n | Language/Platform | Install                                    |                                                                                                                                                                                      |\n| ----------------- | ------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |\n| Python            | `pip install sqlite-url`                 | [![PyPI](https://img.shields.io/pypi/v/sqlite-url.svg?color=blue\u0026logo=python\u0026logoColor=white)](https://pypi.org/project/sqlite-url/)                                             |\n| Node.js           | `npm install sqlite-url`                 | [![npm](https://img.shields.io/npm/v/sqlite-url.svg?color=green\u0026logo=nodedotjs\u0026logoColor=white)](https://www.npmjs.com/package/sqlite-url)                                       |\n| Deno              | [`deno.land/x/sqlite_url`](https://deno.land/x/sqlite_url)           | [![deno.land/x release](https://img.shields.io/github/v/release/asg017/sqlite-url?color=fef8d2\u0026include_prereleases\u0026label=deno.land%2Fx\u0026logo=deno)](https://deno.land/x/sqlite_url)                                                                       |\n| [Datasette](https://datasette.io/)         | `datasette install datasette-sqlite-url` | [![PyPI](https://img.shields.io/pypi/v/datasette-sqlite-url.svg?color=B6B6D9\u0026label=Datasette+plugin\u0026logoColor=white\u0026logo=python)](https://pypi.org/project/datasette-sqlite-url) |\n| [sqlite-utils](https://sqlite-utils.datasette.io/)         | `sqlite-utils install sqlite-utils-sqlite-url` | [![PyPI](https://img.shields.io/pypi/v/sqlite-utils-sqlite-url.svg?color=B6B6D9\u0026label=sqlite-utils+plugin\u0026logoColor=white\u0026logo=python)](https://pypi.org/project/sqlite-utils-sqlite-url) |\n| Ruby              | `gem install sqlite-url`                 | ![Gem](https://img.shields.io/gem/v/sqlite-url?color=red\u0026logo=rubygems\u0026logoColor=white)                                                                                                  |\n| Github Release    |                                            | ![GitHub tag (latest SemVer pre-release)](https://img.shields.io/github/v/tag/asg017/sqlite-url?color=lightgrey\u0026include_prereleases\u0026label=Github+release\u0026logo=github)\n\n\n\n- `linux-x86_64` (Linux x86_64)\n- `macos-x86_64` (MacOS x86_64)\n\n\n\n\n\n\n### [`sqlite-xsv`](https://github.com/asg017/sqlite-xsv)\n\n\nA fast and performant SQLite extension for CSV files, written in Rust!\n\n- Query CSVs, TSVs, and other-SVs as SQLite virtual tables\n- The \"reader\" interface lets you query CSVs from other data sources, such as [`sqlite-http`](#sqlite-http)\n- Builtin support for querying CSVs with gzip or zstd compression\n\n```sql\ncreate virtual table temp.students using csv(\n  filename=\"students.csv\"\n);\n\nselect * from temp.students;\n\ncreate virtual table temp.students_gz using csv(\n  filename=\"students.csv.gz\"\n);\n\ncreate virtual table temp.students_reader using csv_reader(\n  id integer,\n  name text,\n  age integer,\n  progess real\n);\nselect * from temp.students_reader('./target/students.csv');\n```\n\n\n\n\n | Language/Platform | Install                                    |                                                                                                                                                                                      |\n| ----------------- | ------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |\n| Python            | `pip install sqlite-xsv`                 | [![PyPI](https://img.shields.io/pypi/v/sqlite-xsv.svg?color=blue\u0026logo=python\u0026logoColor=white)](https://pypi.org/project/sqlite-xsv/)                                             |\n| Node.js           | `npm install sqlite-xsv`                 | [![npm](https://img.shields.io/npm/v/sqlite-xsv.svg?color=green\u0026logo=nodedotjs\u0026logoColor=white)](https://www.npmjs.com/package/sqlite-xsv)                                       |\n| Deno              | [`deno.land/x/sqlite_xsv`](https://deno.land/x/sqlite_xsv)           | [![deno.land/x release](https://img.shields.io/github/v/release/asg017/sqlite-xsv?color=fef8d2\u0026include_prereleases\u0026label=deno.land%2Fx\u0026logo=deno)](https://deno.land/x/sqlite_xsv)                                                                       |\n| Ruby              | `gem install sqlite-xsv`                 | ![Gem](https://img.shields.io/gem/v/sqlite-xsv?color=red\u0026logo=rubygems\u0026logoColor=white)                                                                                                  |\n| Github Release    |                                            | ![GitHub tag (latest SemVer pre-release)](https://img.shields.io/github/v/tag/asg017/sqlite-xsv?color=lightgrey\u0026include_prereleases\u0026label=Github+release\u0026logo=github)\n\n\n\n- `linux-x86_64` (Linux x86_64)\n- `macos-x86_64` (MacOS x86_64)\n- `macos-aarch64` (MacOS M1 and M2 chips)\n- `windows-x86_64` (Windows x86_64)\n\n\n\n\n\n\n### [`sqlite-regex`](https://github.com/asg017/sqlite-regex)\n\n\nA fast SQLite extension for regular expressions.\n\n```sql\nselect regex_find(\n  '[0-9]{3}-[0-9]{3}-[0-9]{4}',\n  'phone: 111-222-3333'\n);\n\nselect rowid, *\nfrom regex_find_all(\n  '\\b\\w{13}\\b',\n  'Retroactively relinquishing remunerations is reprehensible.'\n);\n/*\n┌───────┬───────┬─────┬───────────────┐\n│ rowid │ start │ end │     match     │\n├───────┼───────┼─────┼───────────────┤\n│ 0     │ 0     │ 13  │ Retroactively │\n│ 1     │ 14    │ 27  │ relinquishing │\n│ 2     │ 28    │ 41  │ remunerations │\n│ 3     │ 45    │ 58  │ reprehensible │\n└───────┴───────┴─────┴───────────────┘\n*/\n```\n\n\n\n\n | Language/Platform | Install                                    |                                                                                                                                                                                      |\n| ----------------- | ------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |\n| Python            | `pip install sqlite-regex`                 | [![PyPI](https://img.shields.io/pypi/v/sqlite-regex.svg?color=blue\u0026logo=python\u0026logoColor=white)](https://pypi.org/project/sqlite-regex/)                                             |\n| Node.js           | `npm install sqlite-regex`                 | [![npm](https://img.shields.io/npm/v/sqlite-regex.svg?color=green\u0026logo=nodedotjs\u0026logoColor=white)](https://www.npmjs.com/package/sqlite-regex)                                       |\n| Deno              | [`deno.land/x/sqlite_regex`](https://deno.land/x/sqlite_regex)           | [![deno.land/x release](https://img.shields.io/github/v/release/asg017/sqlite-regex?color=fef8d2\u0026include_prereleases\u0026label=deno.land%2Fx\u0026logo=deno)](https://deno.land/x/sqlite_regex)                                                                       |\n| [Datasette](https://datasette.io/)         | `datasette install datasette-sqlite-regex` | [![PyPI](https://img.shields.io/pypi/v/datasette-sqlite-regex.svg?color=B6B6D9\u0026label=Datasette+plugin\u0026logoColor=white\u0026logo=python)](https://pypi.org/project/datasette-sqlite-regex) |\n| [sqlite-utils](https://sqlite-utils.datasette.io/)         | `sqlite-utils install sqlite-utils-sqlite-regex` | [![PyPI](https://img.shields.io/pypi/v/sqlite-utils-sqlite-regex.svg?color=B6B6D9\u0026label=sqlite-utils+plugin\u0026logoColor=white\u0026logo=python)](https://pypi.org/project/sqlite-utils-sqlite-regex) |\n| Ruby              | `gem install sqlite-regex`                 | ![Gem](https://img.shields.io/gem/v/sqlite-regex?color=red\u0026logo=rubygems\u0026logoColor=white)                                                                                                  |\n| Github Release    |                                            | ![GitHub tag (latest SemVer pre-release)](https://img.shields.io/github/v/tag/asg017/sqlite-regex?color=lightgrey\u0026include_prereleases\u0026label=Github+release\u0026logo=github)\n\n\n\n- `linux-x86_64` (Linux x86_64)\n- `macos-x86_64` (MacOS x86_64)\n- `macos-aarch64` (MacOS M1 and M2 chips)\n- `windows-x86_64` (Windows x86_64)\n\n\n\n\n\n\n### [`sqlite-ulid`](https://github.com/asg017/sqlite-ulid)\n\n\nA SQLite extension for generating and working with [ULIDs](https://github.com/ulid/spec).\n\n```sql\nselect ulid(); -- '01gqr4j69cc7w1xdbarkcbpq17'\nselect ulid_bytes(); -- X'0185310899dd7662b8f1e5adf9a5e7c0'\nselect ulid_with_prefix('invoice'); -- 'invoice_01gqr4jmhxhc92x1kqkpxb8j16'\nselect ulid_datetime('01gqr4j69cc7w1xdbarkcbpq17') -- '2023-01-26 22:53:20.556'\n```\n\n\n\n\n | Language/Platform | Install                                    |                                                                                                                                                                                      |\n| ----------------- | ------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |\n| Python            | `pip install sqlite-ulid`                 | [![PyPI](https://img.shields.io/pypi/v/sqlite-ulid.svg?color=blue\u0026logo=python\u0026logoColor=white)](https://pypi.org/project/sqlite-ulid/)                                             |\n| Node.js           | `npm install sqlite-ulid`                 | [![npm](https://img.shields.io/npm/v/sqlite-ulid.svg?color=green\u0026logo=nodedotjs\u0026logoColor=white)](https://www.npmjs.com/package/sqlite-ulid)                                       |\n| Deno              | [`deno.land/x/sqlite_ulid`](https://deno.land/x/sqlite_ulid)           | [![deno.land/x release](https://img.shields.io/github/v/release/asg017/sqlite-ulid?color=fef8d2\u0026include_prereleases\u0026label=deno.land%2Fx\u0026logo=deno)](https://deno.land/x/sqlite_ulid)                                                                       |\n| [Datasette](https://datasette.io/)         | `datasette install datasette-sqlite-ulid` | [![PyPI](https://img.shields.io/pypi/v/datasette-sqlite-ulid.svg?color=B6B6D9\u0026label=Datasette+plugin\u0026logoColor=white\u0026logo=python)](https://pypi.org/project/datasette-sqlite-ulid) |\n| [sqlite-utils](https://sqlite-utils.datasette.io/)         | `sqlite-utils install sqlite-utils-sqlite-ulid` | [![PyPI](https://img.shields.io/pypi/v/sqlite-utils-sqlite-ulid.svg?color=B6B6D9\u0026label=sqlite-utils+plugin\u0026logoColor=white\u0026logo=python)](https://pypi.org/project/sqlite-utils-sqlite-ulid) |\n| Ruby              | `gem install sqlite-ulid`                 | ![Gem](https://img.shields.io/gem/v/sqlite-ulid?color=red\u0026logo=rubygems\u0026logoColor=white)                                                                                                  |\n| Github Release    |                                            | ![GitHub tag (latest SemVer pre-release)](https://img.shields.io/github/v/tag/asg017/sqlite-ulid?color=lightgrey\u0026include_prereleases\u0026label=Github+release\u0026logo=github)\n\n\n\n- `linux-x86_64` (Linux x86_64)\n- `macos-x86_64` (MacOS x86_64)\n- `macos-aarch64` (MacOS M1 and M2 chips)\n- `windows-x86_64` (Windows x86_64)\n\n\n\n\n\n\n### [`sqlite-jsonschema`](https://github.com/asg017/sqlite-jsonschema)\n\nA SQLite extension for validating JSON objects with [JSON Schema](https://json-schema.org/).\n\n```sql\nselect jsonschema_matches('{\"maxLength\": 5}', json_quote('alex')); -- 1\n```\n\n\n\n\n | Language/Platform | Install                                    |                                                                                                                                                                                      |\n| ----------------- | ------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |\n| Python            | `pip install sqlite-jsonschema`                 | [![PyPI](https://img.shields.io/pypi/v/sqlite-jsonschema.svg?color=blue\u0026logo=python\u0026logoColor=white)](https://pypi.org/project/sqlite-jsonschema/)                                             |\n| Node.js           | `npm install sqlite-jsonschema`                 | [![npm](https://img.shields.io/npm/v/sqlite-jsonschema.svg?color=green\u0026logo=nodedotjs\u0026logoColor=white)](https://www.npmjs.com/package/sqlite-jsonschema)                                       |\n| Deno              | [`deno.land/x/sqlite_jsonschema`](https://deno.land/x/sqlite_jsonschema)           | [![deno.land/x release](https://img.shields.io/github/v/release/asg017/sqlite-jsonschema?color=fef8d2\u0026include_prereleases\u0026label=deno.land%2Fx\u0026logo=deno)](https://deno.land/x/sqlite_jsonschema)                                                                       |\n| [Datasette](https://datasette.io/)         | `datasette install datasette-sqlite-jsonschema` | [![PyPI](https://img.shields.io/pypi/v/datasette-sqlite-jsonschema.svg?color=B6B6D9\u0026label=Datasette+plugin\u0026logoColor=white\u0026logo=python)](https://pypi.org/project/datasette-sqlite-jsonschema) |\n| [sqlite-utils](https://sqlite-utils.datasette.io/)         | `sqlite-utils install sqlite-utils-sqlite-jsonschema` | [![PyPI](https://img.shields.io/pypi/v/sqlite-utils-sqlite-jsonschema.svg?color=B6B6D9\u0026label=sqlite-utils+plugin\u0026logoColor=white\u0026logo=python)](https://pypi.org/project/sqlite-utils-sqlite-jsonschema) |\n| Ruby              | `gem install sqlite-jsonschema`                 | ![Gem](https://img.shields.io/gem/v/sqlite-jsonschema?color=red\u0026logo=rubygems\u0026logoColor=white)                                                                                                  |\n| Github Release    |                                            | ![GitHub tag (latest SemVer pre-release)](https://img.shields.io/github/v/tag/asg017/sqlite-jsonschema?color=lightgrey\u0026include_prereleases\u0026label=Github+release\u0026logo=github)\n\n\n\n- `linux-x86_64` (Linux x86_64)\n- `macos-x86_64` (MacOS x86_64)\n- `macos-aarch64` (MacOS M1 and M2 chips)\n- `windows-x86_64` (Windows x86_64)\n\n\n\n\n\n\n### [`sqlite-fastrand`](https://github.com/asg017/sqlite-fastrand)\n\n\nA SQLite extension for quickly generating random numbers, booleans, characters, and blobs\n\n```sql\nselect fastrand_int(); -- 556823563\nselect fastrand_alphabetic(); -- 's'\nselect fastrand_uppercase();-- 'M'\nselect fastrand_double(); -- 0.740834390248454\n```\n\n\n\n\n | Language/Platform | Install                                    |                                                                                                                                                                                      |\n| ----------------- | ------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |\n| Python            | `pip install sqlite-fastrand`                 | [![PyPI](https://img.shields.io/pypi/v/sqlite-fastrand.svg?color=blue\u0026logo=python\u0026logoColor=white)](https://pypi.org/project/sqlite-fastrand/)                                             |\n| Node.js           | `npm install sqlite-fastrand`                 | [![npm](https://img.shields.io/npm/v/sqlite-fastrand.svg?color=green\u0026logo=nodedotjs\u0026logoColor=white)](https://www.npmjs.com/package/sqlite-fastrand)                                       |\n| Deno              | [`deno.land/x/sqlite_fastrand`](https://deno.land/x/sqlite_fastrand)           | [![deno.land/x release](https://img.shields.io/github/v/release/asg017/sqlite-fastrand?color=fef8d2\u0026include_prereleases\u0026label=deno.land%2Fx\u0026logo=deno)](https://deno.land/x/sqlite_fastrand)                                                                       |\n| [Datasette](https://datasette.io/)         | `datasette install datasette-sqlite-fastrand` | [![PyPI](https://img.shields.io/pypi/v/datasette-sqlite-fastrand.svg?color=B6B6D9\u0026label=Datasette+plugin\u0026logoColor=white\u0026logo=python)](https://pypi.org/project/datasette-sqlite-fastrand) |\n| [sqlite-utils](https://sqlite-utils.datasette.io/)         | `sqlite-utils install sqlite-utils-sqlite-fastrand` | [![PyPI](https://img.shields.io/pypi/v/sqlite-utils-sqlite-fastrand.svg?color=B6B6D9\u0026label=sqlite-utils+plugin\u0026logoColor=white\u0026logo=python)](https://pypi.org/project/sqlite-utils-sqlite-fastrand) |\n| Ruby              | `gem install sqlite-fastrand`                 | ![Gem](https://img.shields.io/gem/v/sqlite-fastrand?color=red\u0026logo=rubygems\u0026logoColor=white)                                                                                                  |\n| Github Release    |                                            | ![GitHub tag (latest SemVer pre-release)](https://img.shields.io/github/v/tag/asg017/sqlite-fastrand?color=lightgrey\u0026include_prereleases\u0026label=Github+release\u0026logo=github)\n\n\n\n- `linux-x86_64` (Linux x86_64)\n- `macos-x86_64` (MacOS x86_64)\n- `macos-aarch64` (MacOS M1 and M2 chips)\n- `windows-x86_64` (Windows x86_64)\n\n\n\n\n\n\n### [`sqlite-vss`](https://github.com/asg017/sqlite-vss)\n\nA SQLite extension for efficient vector search, based on Faiss!\n\n```sql\ncreate virtual table vss_articles using vss0(\n  headline_embedding(384),\n  description_embedding(384),\n);\n\ninsert into vss_articles(rowid, headline_embedding)\n  select rowid, headline_embedding from articles;\n\nselect rowid, distance\nfrom vss_articles\nwhere vss_search(\n  headline_embedding,\n  (select headline_embedding from articles where rowid = 123)\n)\nlimit 100;\n```\n\n\n\n\n | Language/Platform | Install                                    |                                                                                                                                                                                      |\n| ----------------- | ------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |\n| Python            | `pip install sqlite-vss`                 | [![PyPI](https://img.shields.io/pypi/v/sqlite-vss.svg?color=blue\u0026logo=python\u0026logoColor=white)](https://pypi.org/project/sqlite-vss/)                                             |\n| Node.js           | `npm install sqlite-vss`                 | [![npm](https://img.shields.io/npm/v/sqlite-vss.svg?color=green\u0026logo=nodedotjs\u0026logoColor=white)](https://www.npmjs.com/package/sqlite-vss)                                       |\n| Deno              | [`deno.land/x/sqlite_vss`](https://deno.land/x/sqlite_vss)           | [![deno.land/x release](https://img.shields.io/github/v/release/asg017/sqlite-vss?color=fef8d2\u0026include_prereleases\u0026label=deno.land%2Fx\u0026logo=deno)](https://deno.land/x/sqlite_vss)                                                                       |\n| [Datasette](https://datasette.io/)         | `datasette install datasette-sqlite-vss` | [![PyPI](https://img.shields.io/pypi/v/datasette-sqlite-vss.svg?color=B6B6D9\u0026label=Datasette+plugin\u0026logoColor=white\u0026logo=python)](https://pypi.org/project/datasette-sqlite-vss) |\n| [sqlite-utils](https://sqlite-utils.datasette.io/)         | `sqlite-utils install sqlite-utils-sqlite-vss` | [![PyPI](https://img.shields.io/pypi/v/sqlite-utils-sqlite-vss.svg?color=B6B6D9\u0026label=sqlite-utils+plugin\u0026logoColor=white\u0026logo=python)](https://pypi.org/project/sqlite-utils-sqlite-vss) |\n| Ruby              | `gem install sqlite-vss`                 | ![Gem](https://img.shields.io/gem/v/sqlite-vss?color=red\u0026logo=rubygems\u0026logoColor=white)                                                                                                  |\n| Github Release    |                                            | ![GitHub tag (latest SemVer pre-release)](https://img.shields.io/github/v/tag/asg017/sqlite-vss?color=lightgrey\u0026include_prereleases\u0026label=Github+release\u0026logo=github)\n\n\n\n- `linux-x86_64` (Linux x86_64)\n- `macos-x86_64` (MacOS x86_64)\n- `macos-aarch64` (MacOS M1 and M2 chips)\n\n\n\n\n\n\n### [`sqlite-hello`](https://github.com/asg017/sqlite-hello)\n\nThe smallest \"Hello world\" SQLite extension possible.\n\n```sql\nsqlite\u003e .load ./hello0\nsqlite\u003e select hello('Alex');\n'Hello, Alex!'\n```\n\n\n\n\n | Language/Platform | Install                                    |                                                                                                                                                                                      |\n| ----------------- | ------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |\n| Python            | `pip install sqlite-hello`                 | [![PyPI](https://img.shields.io/pypi/v/sqlite-hello.svg?color=blue\u0026logo=python\u0026logoColor=white)](https://pypi.org/project/sqlite-hello/)                                             |\n| Node.js           | `npm install sqlite-hello`                 | [![npm](https://img.shields.io/npm/v/sqlite-hello.svg?color=green\u0026logo=nodedotjs\u0026logoColor=white)](https://www.npmjs.com/package/sqlite-hello)                                       |\n| Deno              | [`deno.land/x/sqlite_hello`](https://deno.land/x/sqlite_hello)           | [![deno.land/x release](https://img.shields.io/github/v/release/asg017/sqlite-hello?color=fef8d2\u0026include_prereleases\u0026label=deno.land%2Fx\u0026logo=deno)](https://deno.land/x/sqlite_hello)                                                                       |\n| [Datasette](https://datasette.io/)         | `datasette install datasette-sqlite-hello` | [![PyPI](https://img.shields.io/pypi/v/datasette-sqlite-hello.svg?color=B6B6D9\u0026label=Datasette+plugin\u0026logoColor=white\u0026logo=python)](https://pypi.org/project/datasette-sqlite-hello) |\n| [sqlite-utils](https://sqlite-utils.datasette.io/)         | `sqlite-utils install sqlite-utils-sqlite-hello` | [![PyPI](https://img.shields.io/pypi/v/sqlite-utils-sqlite-hello.svg?color=B6B6D9\u0026label=sqlite-utils+plugin\u0026logoColor=white\u0026logo=python)](https://pypi.org/project/sqlite-utils-sqlite-hello) |\n| Ruby              | `gem install sqlite-hello`                 | ![Gem](https://img.shields.io/gem/v/sqlite-hello?color=red\u0026logo=rubygems\u0026logoColor=white)                                                                                                  |\n| Github Release    |                                            | ![GitHub tag (latest SemVer pre-release)](https://img.shields.io/github/v/tag/asg017/sqlite-hello?color=lightgrey\u0026include_prereleases\u0026label=Github+release\u0026logo=github)\n\n\n\n- `linux-x86_64` (Linux x86_64)\n- `macos-x86_64` (MacOS x86_64)\n- `macos-aarch64` (MacOS M1 and M2 chips)\n- `windows-x86_64` (Windows x86_64)\n\n\n\n\n  \n\n### Distribution\n\nSQLite extensions have historically been hard to shared with other people. Installing and using them can be tricky and confusing, but these are some strategies I've used to make that easier!\n\n### `pip` for Python Developers\n\nMost of my SQLite extensions are additional placed in a small Python library and distributed on [PyPi](https://pypi.org/). Python developers can then install these extensions with a `pip install` command like so:\n\n```bash\npip install sqlite-regex\n```\n\nThe actual Python library is small and meant to be used with the builtin `sqlite3` Python module, like so:\n\n```python\nimport sqlite3\nimport sqlite_regex\n\ndb = sqlite3.connect(':memory:')\n\ndb.enable_load_extension(True)\nsqlite_regex.load(db)\n\ndb.execute(\"select regex_version(), '[abc]' regexp 'a';\").fetchone()\n# ('v0.1.0', 1)\n```\n\nSee [_Making SQLite extensions pip install-able\n_](https://observablehq.com/@asg017/making-sqlite-extensions-pip-install-able) (February 2023) for more details.\n\n### `npm` for Node.js Developers\n\nThese extensions are also distributed on [`npm`](https://npmjs.com/) for use in Node.js. they can be install with a `npm install` command like so:\n\n```bash\nnpm install sqlite-regex\n```\n\nAnd then used in Node.js programs with [`better-sqlite3`](https://github.com/WiseLibs/better-sqlite3) or [`node-sqlite3`](https://github.com/TryGhost/node-sqlite3) like so:\n\n```js\nimport Database from \"better-sqlite3\";\nimport * as sqlite_regex from \"sqlite-regex\";\n\nconst db = new Database(\":memory:\");\n\ndb.loadExtension(sqlite_regex.getLoadablePath());\n\nconst version = db.prepare(\"select regex_version()\").pluck().get();\nconsole.log(version); // \"v0.2.0\"\n```\n\nSee [_Making SQLite extensions npm install'able for Node.js, and on deno.land/x for Deno_](https://observablehq.com/@asg017/making-sqlite-extensions-npm-installable-and-deno) (March 2023) for more details.\n\n### `deno.land/x` for Deno Developers\n\nThese extensions are also distributed on [`deno.land/x`](https://deno.land/x) for use in [Deno](https://deno.land/) programs. It's meant to work with the [`x/sqlite3`](https://deno.land/x/sqlite3) client like so:\n\n```ts\nimport { Database } from \"https://deno.land/x/sqlite3@0.8.0/mod.ts\";\nimport * as sqlite_regex from \"https://deno.land/x/sqlite_regex@v0.2.3-alpha.2/mod.ts\";\n\nconst db = new Database(\":memory:\");\n\ndb.enableLoadExtension = true;\nsqlite_regex.load(db);\n\nconst [version] = db.prepare(\"select regex_version()\").value\u003c[string]\u003e()!;\n\nconsole.log(version);\n```\n\nSee [the \"Deno\" section of _Making SQLite extensions npm install'able for Node.js, and on deno.land/x for Deno_](https://observablehq.com/@asg017/making-sqlite-extensions-npm-installable-and-deno#cell-13) (March 2023) for more details.\n\n### `gem` for ruby Developers\n\nThese extensions are also distributed on [rubygems.org](https://rubygems.org/) for use in Ruby applications. It's meant to work with the [`sqlite3`](https://rubygems.org/gems/sqlite3) client like so:\n\n```ruby\nrequire 'sqlite3'\nrequire 'sqlite_regex'\n\ndb = SQLite3::Database.new(':memory:')\ndb.enable_load_extension(true)\nSqliteRegex.load(db)\ndb.enable_load_extension(false)\n\nresult = db.execute(\"select regex_version(), '[abc]' regexp 'a';\")\nputs result.first.first # \"v0.2.3-alpha.7\"\nputs result.first.last  # 1\n```\n\nSee [_Making SQLite extension gem install'able for Ruby Developers_](https://observablehq.com/@asg017/making-sqlite-extension-gem-installable) (June 2023) for more details.\n\n### As Datasette Plugins\n\nMost of these SQLite extensions are also distributed as [Datasette Plugins](https://datasette.io/plugins). They are small wrappers around their corresponding [pip packages](#pip-for-python-developers).\n\nThey can be installed like so:\n\n```bash\ndatasette install datasette-sqlite-regex\n```\n\nNow all future Datasette instances will include `sqlite-regex` functions. Here we test it using [`datasette --get`](https://docs.datasette.io/en/stable/cli-reference.html#datasette-get).\n\n```\n$ datasette --get '/_memory.csv?sql=select+regex_version()'\nregex_version()\nv0.1.0\n```\n### As sqlite-utils Plugins\n\nMost of these SQLite extensions are also distributed as [sqlite-utils plugins](https://sqlite-utils.datasette.io/en/stable/plugins.html). They are small wrappers around their corresponding [pip packages](#pip-for-python-developers).\n\nThey can be installed like so:\n\n```bash\nsqlite-utils install sqlite-utils-sqlite-regex\n```\n\nNow when using the sqlite-utils CLI, the `sqlite-regex` functions will be available.\n\n```\n$ sqlite-utils memory 'select regex_version()'\n[{\"regex_version()\": \"v0.2.3\"}]\n```\n\n## Roadmap\n\nVarious extensions and tools that I plan to build and open source in the future! Most of the development of these happen in private repos, to make my life easier.\n\nIf you're interested in any of these, just send me a message!\n\n### Future SQLite Extensions\n\n- `sqlite-img`: Query and manipulate images (cropping, thumbnails, rotation, etc.)\n- `sqlite-xml`: Query XML documents with XPath strings\n- `sqlite-assert`: Make assertions of your data at query-time\n- `sqlite-parquet`: Query Parquet files from SQLite\n- `sqlite-md`: Query Markdown documents as their AST\n- `sqlite-geo`: A GIS extension, a slimmed-down alternative to spatialite\n- `sqlite-python`: Write loadable SQLite extensions in pure Python\n- `sqlite-qjs`: Create custom scalar, aggregate, and table functions in JavaScript with [QuickJS](https://bellard.org/quickjs/)\n- `sqlite-duckdb`: Query and insert data in DuckDB tables, query CSVs/Parquet/JSON with DuckDB\n- `sqlite-pg`: Query and insert data into Postgres tables\n- `sqlite-notion`: Query and insert data into Notion databases\n- `sqlite-google-sheets`: query and insert data into Google Sheet\n\n### Future Extension Bindings\n\n- Elixir\n- Rust\n- Go\n\n### Future Tooling\n\n- `sqlite-package-manager`: A command-line tool for manage SQLite extensions for your project, similar to npm/pip/brew\n- `sqlite-docs`: Document SQLite tables and columns with in-line comments on `CREATE TABLE` statements, like JSDoc/rustdoc/docstrings\n- `sqlitex`: A modern `sqlite3` alternative, a new CLI with Parquet/S3 support, a bigger stdlib, syntax highlighting, and more\n\n","funding_links":[],"categories":["TypeScript","Extensions","others","other"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasg017%2Fsqlite-ecosystem","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fasg017%2Fsqlite-ecosystem","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasg017%2Fsqlite-ecosystem/lists"}