Import unstructured data (text and images) into structured tables
Project description
datasette-extract
Import unstructured data (text and images) into structured tables
Installation
Install this plugin in the same environment as Datasette.
datasette install datasette-extract
This plugin depends on datasette-llm for LLM model management, API key handling, and model provider integration. See the datasette-llm README for instructions on installing model providers and configuring API keys.
Configuration
datasette-extract registers an extract purpose with datasette-llm. You can optionally configure which models are available and set a default model for extraction using datasette-llm's purpose-specific configuration:
plugins:
datasette-llm:
purposes:
extract:
model: gpt-5.4-mini
models:
- gpt-5.4-nano
- gpt-5.4
- claude-opus-4.6
The model selector in the UI is only shown if more than one model is available.
Usage
This plugin provides the following features:
- In the database action cog menu for a database select "Create table with extracted data" to create a new table with data extracted from text or an image
- In the table action cog menu select "Extract data into this table" to extract data into an existing table
When creating a table you can specify the column names, types and provide an optional hint (like "YYYY-MM-DD" for dates) to influence how the data should be extracted.
When populating an existing table you can provide hints and select which columns should be populated.
Text input can be pasted directly into the textarea.
Drag and drop a PDF or text file onto the textarea to populate it with the contents of that file. PDF files will have their text extracted, but only if the file contains text as opposed to scanned images.
Drag and drop a single image onto the textarea - or select it with the image file input box - to process an image.
Permissions
Users must have the datasette-extract permission to use this tool.
In order to create tables they also need the create-table permission.
To insert rows into an existing table they need insert-row.
Development
The recommended way to develop this plugin uses uv. To run the tests:
cd datasette-extract
uv run pytest
To run a development server with an OpenAI API key:
DATASETTE_SECRETS_OPENAI_API_KEY="sk-..." \
uv run datasette data.db --create --root --secret 1 \
-s plugins.datasette-llm.purposes.extract.models '["gpt-5.4-mini"]' \
--internal internal.db --reload
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file datasette_extract-0.3a0.tar.gz.
File metadata
- Download URL: datasette_extract-0.3a0.tar.gz
- Upload date:
- Size: 359.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c404e0c6a2151c8114136827a1ba31eef1199ec27c429a6d841d850ac7cd2bff
|
|
| MD5 |
43aa44f191a84d185c6311641b354ca4
|
|
| BLAKE2b-256 |
97c10dca7ad249ff2fb068b1f55a94885a823e3a91a0b5a3087beb9ea7e5bad4
|
Provenance
The following attestation bundles were made for datasette_extract-0.3a0.tar.gz:
Publisher:
publish.yml on datasette/datasette-extract
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
datasette_extract-0.3a0.tar.gz -
Subject digest:
c404e0c6a2151c8114136827a1ba31eef1199ec27c429a6d841d850ac7cd2bff - Sigstore transparency entry: 1204607660
- Sigstore integration time:
-
Permalink:
datasette/datasette-extract@4456f54f0cebf6aee9d0d5f7ee06f5988b34402e -
Branch / Tag:
refs/tags/0.3a0 - Owner: https://github.com/datasette
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@4456f54f0cebf6aee9d0d5f7ee06f5988b34402e -
Trigger Event:
release
-
Statement type:
File details
Details for the file datasette_extract-0.3a0-py3-none-any.whl.
File metadata
- Download URL: datasette_extract-0.3a0-py3-none-any.whl
- Upload date:
- Size: 361.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6b0e1b93d407aac97dadc741f39b6cee5fe73a3ffe9e628bfc7671bc191667c3
|
|
| MD5 |
20795d628b4505b608652e3eff063ff0
|
|
| BLAKE2b-256 |
fb7e2a986f9e328de2f866e54ab68af0cae5632435e14eb7305343fa8ad36cff
|
Provenance
The following attestation bundles were made for datasette_extract-0.3a0-py3-none-any.whl:
Publisher:
publish.yml on datasette/datasette-extract
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
datasette_extract-0.3a0-py3-none-any.whl -
Subject digest:
6b0e1b93d407aac97dadc741f39b6cee5fe73a3ffe9e628bfc7671bc191667c3 - Sigstore transparency entry: 1204607671
- Sigstore integration time:
-
Permalink:
datasette/datasette-extract@4456f54f0cebf6aee9d0d5f7ee06f5988b34402e -
Branch / Tag:
refs/tags/0.3a0 - Owner: https://github.com/datasette
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@4456f54f0cebf6aee9d0d5f7ee06f5988b34402e -
Trigger Event:
release
-
Statement type: