datasette/datasette/utils
Claude 73225ccad0
Add column types system for semantic column annotations
Implements the column types feature that lets Datasette and plugins annotate
columns with semantic types beyond SQLite storage types (e.g. markdown, email,
url, json, file, point). This enables type-appropriate rendering, validation,
form widgets, and API behavior.

Key changes:
- New `column_types` internal DB table for storing assignments
- `ColumnType` dataclass in datasette/column_types.py with render_cell,
  validate, and transform_value methods
- `register_column_types` plugin hook for registering types
- Built-in url, email, and json column types
- Datasette API methods: get/set/remove_column_type(s),
  get_column_type_class
- Config loading from datasette.json `column_types` table config key
- `column_types` extra on the table JSON endpoint
- Column type info in display_columns extra
- Column type render_cell gets priority in rendering pipeline
- column_type/column_type_config args added to render_cell hookspec
- Write-path validation on insert and update

https://claude.ai/code/session_01SvPEPqHgURTWESRp28pTC3
2026-03-17 02:40:37 +00:00
..
__init__.py Black formatting 2026-02-17 13:30:24 -08:00
actions_sql.py Black formatting 2026-02-17 13:30:24 -08:00
asgi.py Add request.form() for multipart form data and file uploads 2026-01-28 18:41:03 -08:00
baseconv.py Rename to_decimal/from_decimal to decode/encode, refs #1734 2022-05-02 12:44:09 -07:00
check_callable.py Fix for asyncio.iscoroutinefunction deprecation warnings 2025-10-08 20:32:16 -07:00
internal_db.py Add column types system for semantic column annotations 2026-03-17 02:40:37 +00:00
multipart.py Add request.form() for multipart form data and file uploads 2026-01-28 18:41:03 -08:00
permissions.py Black formatting 2026-02-17 13:30:24 -08:00
shutil_backport.py Upgrade to latest Black, closes #2239 2024-01-30 19:55:26 -08:00
sqlite.py Show pysqlite3 version on /-/versions, if installed - #1125 2020-12-03 14:08:50 -08:00
testing.py Fixed bug with ?_trace=1 and large responses, closes #2404 2024-08-21 10:58:17 -07:00