Simon Willison
1ac4265ffd
Require permissions for untrusted stored query execution, refs #2735
2026-05-26 12:12:59 -07:00
Simon Willison
4a1a4d7807
Query is_trusted and is_private properties
...
Refs https://github.com/simonw/datasette/issues/2735#issuecomment-4547270516
Diff explanation: https://gist.github.com/simonw/1e4de6c4b041a51968eb273ee96dec1f
2026-05-26 11:59:49 -07:00
Simon Willison
f1dd86ebfb
Tweak URL designs of new endpoints
2026-05-25 14:05:26 -07:00
Simon Willison
1f7c26ffea
Refactor to share JS/HTML between execute and execute-write
...
Refs #2742
2026-05-25 12:45:42 -07:00
Simon Willison
e1261442c0
Update parameters/query operations as user edits the write query
...
Refs #2742
2026-05-25 12:09:52 -07:00
Simon Willison
6eee6c81e8
Add global query browser
...
Refs #2735
2026-05-25 10:24:42 -07:00
Simon Willison
4a70b89355
Add cursor-paginated query browser
...
Refs #2735
2026-05-25 10:11:46 -07:00
Simon Willison
539ff9ddfc
Drop query publication check from docs
...
Refs #2735
2026-05-25 09:49:21 -07:00
Simon Willison
2d07c3b99e
Ran cog
2026-05-25 09:47:12 -07:00
Simon Willison
e62a5ea337
Rename query publication flag
...
Refs #2735
2026-05-25 09:46:39 -07:00
Simon Willison
e0d39ba69f
Store query options as JSON
...
Refs #2735
2026-05-25 09:41:32 -07:00
Simon Willison
ef43c10388
Add arbitrary write SQL execution page
...
Refs #2735
2026-05-25 08:30:49 -07:00
Simon Willison
2d77e3334b
Clean up query management test coverage
...
Refs #2735
2026-05-24 23:06:01 -07:00
Simon Willison
3b26b7aff0
Document canned query hook removal
...
Refs #2735
2026-05-24 23:00:00 -07:00
Simon Willison
4b5fac9cf7
Add query management API and create UI
...
Refs #2735
2026-05-24 22:52:06 -07:00
Simon Willison
6cafdcb6fa
Added missing issue reference
2026-05-24 21:18:50 -07:00
Simon Willison
f403ea4e53
No need to alias description as description
2026-05-24 16:47:49 -07:00
Simon Willison
857af9293c
Release 1.0a30
...
Refs #1752 , #2723 , #2725 , #2727
2026-05-24 14:17:45 -07:00
Simon Willison
b9cb8e9a30
Tweaked JumpSQL changelog, refs #2731
2026-05-23 21:14:35 -07:00
Simon Willison
c1525cb467
Improved examples in JumpSQL docs
2026-05-23 21:01:18 -07:00
Simon Willison
c980234c41
JumpSQL(database=) parameter
...
Refs https://github.com/simonw/datasette/pull/2732#issuecomment-4527304912
2026-05-23 21:00:04 -07:00
Simon Willison
cef6aa85b6
Remove source and source_key columns from JumpSQL
...
Refs https://github.com/simonw/datasette/pull/2732#issuecomment-4527290391
2026-05-23 20:41:32 -07:00
Simon Willison
21a79b34b8
Improvements to Jump SQL columns
...
- Removed database_name and resource_name
- url can now optionally return JSON to reuse datasette.urls. methods
- description is now used as a truncated text description
2026-05-23 20:28:02 -07:00
Simon Willison
9c1f8621eb
Request is always set for jump_items_sql() hook
2026-05-23 16:59:45 -07:00
Simon Willison
be1b5b2b5c
Move debug links into jump menu
2026-05-23 16:57:09 -07:00
Simon Willison
1590444fa3
Simplify by removing _query_display_names_sql
...
See https://github.com/simonw/datasette/pull/2732/changes#r3293627533
2026-05-23 16:42:38 -07:00
Copilot
09ccab97cc
Run cog to update generated plugin docs ( #2734 )
...
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
2026-05-23 09:34:03 -07:00
Simon Willison
f46c245563
blacken-docs
2026-05-23 08:58:51 -07:00
Simon Willison
8568320a23
Replace jump_start() hook with JavaScript makeJumpSections() hook
2026-05-22 21:13:49 -07:00
Simon Willison
6057c76165
Initial docs for jump_items_sql and jump_start hooks
...
Refs #2731
2026-05-21 23:28:35 -07:00
Simon Willison
9909bd654b
Merge branch 'main' into jump
2026-05-21 23:11:01 -07:00
Simon Willison
1000d50220
datasette.fixtures module, closes #2733
...
https://gist.github.com/simonw/613be79094d491dd08f45e05f4f70691
2026-05-21 23:05:37 -07:00
Simon Willison
fae847ac10
Prototype of new /-/jump menu plus plugin hook
2026-05-21 15:02:17 -07:00
Simon Willison
d3330695fa
Always show 'Jump to...' menu item, closes #2725
2026-05-20 13:23:05 -07:00
Simon Willison
bbbc1cd596
Remove height: 100% to fix Safari bug, closes #2724
2026-05-20 12:34:12 -07:00
Simon Willison
7a914f8c65
Clear stale tables/other resources when DB removed, closes #2723
2026-05-20 12:16:23 -07:00
Simon Willison
3110faa0ba
Replace Janus queue with asyncio.Future
...
Closes #1752
AI generated patch explanation: https://gisthost.github.io/?e2b8d9c7666e988b5c003ff5e5ef3098
2026-05-16 11:45:43 -07:00
Simon Willison
036aa6aa2e
Removed a rogue hyphen
2026-05-12 16:39:46 -07:00
Simon Willison
db16003865
Release 1.0a29
...
Refs #2695 , #2701 , #2708 , #2709
2026-05-12 16:39:06 -07:00
Simon Willison
b15ce18ddc
TokenRestrictions.abbreviated(datasette) utility method for creating _r dicts ( #2696 )
...
Closes #2695
Refs https://github.com/simonw/datasette-auth-tokens/pull/42
2026-04-17 08:44:43 -07:00
Simon Willison
a6031c9847
Release 1.0a28
...
Refs #2691 , #2692 , #2693
2026-04-16 21:01:18 -07:00
Simon Willison
03eeeb9d92
Docs: auto-close plugin now handles function-scoped fixtures
...
Describe the updated scoping rule: instances from test bodies and
function-scoped fixtures are closed automatically; session-, module-,
class- and package-scoped fixtures are exempt.
Refs #2692
2026-04-16 20:38:08 -07:00
Simon Willison
34cc320eab
Pytest auto-close plugin for Datasette instances
...
Installs a pytest11 entry point so that every Datasette() constructed
inside a pytest_runtest_call phase is auto-closed at the end of the test.
Fixture-scoped instances are untouched. Opt out via the
datasette_autoclose = false ini option.
This gives large test suites a safety net against FD exhaustion and leaked
write threads from the now-default temp-disk internal database without
requiring every existing test to be rewritten.
Refs #2692
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-16 20:15:50 -07:00
Simon Willison
290f27158f
Datasette.close() closes databases, shuts down executor, unlinks temp file
...
Datasette.close() iterates over every attached Database (including the
internal database), calls Database.close() on each, then shuts down the
ThreadPoolExecutor. Exceptions raised by one Database don't prevent the
others from being closed; the first exception is re-raised afterwards.
Idempotent.
Refs #2692
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-16 20:10:18 -07:00
Simon Willison
dabf8e4199
Database.close() shuts down write thread and raises DatasetteClosedError
...
After this commit, Database.close() sends a sentinel to the write queue so
the background write thread exits cleanly, closes cached read/write
connections, and marks the instance closed. Subsequent calls to execute*()
raise DatasetteClosedError. close() remains idempotent and one-way.
Refs #2692
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-16 20:09:47 -07:00
Simon Willison
2638200d26
Link to datasette.io preview tool
2026-04-15 17:19:43 -07:00
Simon Willison
1f99d5dd20
Release 1.0a27
...
Refs #1936 , #2678 , #2681 , #2682 , #2683 , #2684 , #2688 , #2689
2026-04-15 16:11:54 -07:00
Simon Willison
67349e0e02
New :pr:ID shortcut for docs
2026-04-15 16:04:17 -07:00
Simon Willison
5f39036b9b
ok: true in /db.json for consistency
2026-04-15 15:44:06 -07:00
Simon Willison
9c164572d3
Add actor= parameter to datasette.client methods ( #2688 )
...
`datasette.client.get(path, actor={"id": "root"}` now makes the internal request with that actor as `request.actor` - same for the other HTTP verb methods on `datasette.client`.
Upgraded relevant tests to use the new `actor=` mechanism.
2026-04-14 18:31:57 -07:00