sqlite-utils/docs
Simon Willison 638b8ca871 --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-24 10:28:35 -08:00
..
_static Experimental TUI powered by Trogon 2023-05-21 11:41:56 -07: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 Small documentation updates to fix warnings 2025-11-24 10:28:35 -08:00
cli-reference.rst --functions can take filenames, can be used multiple times (#681) 2025-11-24 10:28:35 -08:00
cli.rst --functions can take filenames, can be used multiple times (#681) 2025-11-24 10:28:35 -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 Release 3.30 2022-10-25 15:21:34 -07: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 Remove note from docs about 3.8 and deterministic, closes #646 2025-11-24 10:28:35 -08:00
reference.rst sqlite_utils.utils.flatten() function, closes #500 2022-10-18 11:00:35 -07:00
tutorial.ipynb Use python-dateutil package instead of dateutils (#324) 2021-11-14 15:25:40 -08:00