sqlite-utils/docs
Simon Willison 0bbc68089c
--functions can take filenames, can be used multiple times (#681)
Closes #659

The --functions option now accepts:
- File paths ending in .py (e.g., --functions my_funcs.py)
- Multiple invocations (e.g., --functions foo.py --functions 'def bar(): ...')
- Inline Python code (existing behavior)

Implementation follows the same pattern as llm's --functions flag
(simonw/llm@a880c123).

Changes:
- Added multiple=True to --functions Click option in query, bulk, and memory commands
- Modified _register_functions() to detect and read .py files
- Updated _maybe_register_functions() to iterate over multiple function sources
- Removed unused bytes/bytearray handling
- Added comprehensive tests for file paths and multiple invocations
- Updated documentation with examples

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Shorter help for --functions

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-11-23 21:46:51 -08:00
..
_static/js Removed trogon feature in favor of sqlite-util-tui 2025-01-10 17:15:02 -08:00
_templates Reformatted CLI examples in docs 2023-05-21 13:57:22 -07:00
.gitignore Initial project layout + database table creation tools 2018-07-28 06:46:17 -07:00
changelog.rst Use REAL not FLOAT as SQLite column type (#680) 2025-11-23 21:37:59 -08:00
cli-reference.rst --functions can take filenames, can be used multiple times (#681) 2025-11-23 21:46:51 -08:00
cli.rst --functions can take filenames, can be used multiple times (#681) 2025-11-23 21:46:51 -08:00
codespell-ignore-words.txt Run codespell against source code too, refs #307 2021-08-03 10:06:08 -07:00
conf.py Fix for Sphinx bug, closes #533, refs #531 2023-03-12 14:25:26 -07:00
contributing.rst Use uv in the Justfile, refs #674 2025-11-23 19:50:06 -08:00
index.rst Added pluggy and first hook, register_commands - refs #569, #567 2023-07-22 12:04:31 -07:00
installation.rst Use sqlean if available in environment (#560) 2023-06-25 16:25:51 -07:00
Makefile Add reference page to documentation using Sphinx autodoc (#312) 2021-08-10 16:09:28 -07:00
plugins.rst It's return_db, not _return_db - refs #643 2024-11-08 12:13:05 -08:00
python-api.rst Use REAL not FLOAT as SQLite column type (#680) 2025-11-23 21:37:59 -08:00
reference.rst sqlite_utils.utils.flatten() function, closes #500 2022-10-18 11:00:35 -07:00
tutorial.ipynb Use double quotes not braces for tables and columns (#678) 2025-11-23 20:43:26 -08:00