Commit graph

13 commits

Author SHA1 Message Date
Claude
5ee8b2d93c
Implement T1 and T2: exploration, CRUD commands, and output formats
Refactored shared infrastructure:
- _resolve_url(), _resolve_token(), _api_get(), _api_post() helpers
- Shared output formatters: JSON, CSV, TSV, NL-JSON, text table
- DCLIENT_TOKEN and DCLIENT_URL environment variable support

T1 - Core table browsing:
- `databases` - list databases on a Datasette instance
- `tables` - list tables with optional --schema flag
- `schema` - show CREATE TABLE SQL for database/table
- `rows` - browse rows with filtering (-w), sorting, pagination,
  column selection, faceting, full-text search, --limit, --all
- `get` - fetch a single row by primary key

T2 - Write operations:
- `upsert` - insert-or-update rows from file (CSV/TSV/JSON/JSONL)
- `update` - update a single row by PK with key=value pairs
- `delete` - delete a row by PK (with --yes to skip confirmation)
- `drop` - drop a table (shows row count, requires confirmation)
- `create-table` - create empty table with --column name type --pk

Output formats added to query and rows:
- --csv, --tsv, --nl, --json, --table flags

23 new tests covering all commands (62 total, all passing).

https://claude.ai/code/session_01DoiJf9Gbvbw2asN9yvP6dx
2026-02-12 00:22:12 +00:00
Claude
9715510431
Migrate from setup.py to pyproject.toml for uv compatibility
- Replace setup.py with pyproject.toml using uv_build backend
- Add dependency-groups.dev for test dependencies
- Configure flat layout with module-root = ""
- Fix pre-existing test failures (updated error message, optional mock)
- Add uv.lock and dist/ to .gitignore
- uv run pytest (39 passed) and uv build both work

https://claude.ai/code/session_01DoiJf9Gbvbw2asN9yvP6dx
2026-02-12 00:16:43 +00:00
Simon Willison
adfa6cce14 insert --alter support, closes #23 2024-02-27 20:49:54 -08:00
Simon Willison
8c82f9a572 Rename 'datasette client' to 'datasette dt', closes #18
Refs https://github.com/simonw/datasette/issues/2153#issuecomment-1691763427
2024-02-25 11:10:53 -08:00
Simon Willison
59129824e3 Update for Datasette 1.0 alphas to pass tests 2024-02-23 19:56:56 -08:00
Simon Willison
c847badc4e
dclient insert command (#13)
* Move making queries to own page, refs #7
* Documentation for the dclient insert feature, refs #8
* Implemented progress bar for insert, refs #8
* --pk option
* --ignore and --replace for insert, refs #8
* --batch-size option, refs #8
* First insert test, using a mock - refs #8
* insert test that exercises against an in-memory Datasette instance, refs #8
* Insert tests now cover an error case, refs #8
* Tests for --ignore and --replace, refs #8
* Tests for different formats, refs #8
* Test for --no-detect-types
* Support for --encoding, refs #8
2023-07-24 16:22:39 -07:00
Simon Willison
8a205d81a3
dclient auth commands
Closes #3
2023-07-17 16:23:53 -07:00
Simon Willison
c0d25a7512 Fixed failing test 2023-07-17 14:59:34 -07:00
Simon Willison
2c9af739c2 Test for datasette plugin registration, refs #4 2022-11-21 22:31:48 -08:00
Simon Willison
ff3b64f425 alias remove command, alias list --json option - refs #2 2022-11-21 19:00:20 -08:00
Simon Willison
6bc35f46c2 dclient aliases command, closes #2 2022-11-21 18:53:12 -08:00
Simon Willison
1ecb6a02e8 Initial dclient query command, refs #1 2022-11-21 18:16:28 -08:00
simonw
56c4672f37 Initial library structure 2022-11-22 01:57:06 +00:00