Skip to content

Commit 16b2b10

Browse files
authored
Merge pull request #1 from litestar-org/ci/test-pr-1
ci: test pr-1
2 parents ecb17e9 + 150dcd1 commit 16b2b10

File tree

10 files changed

+61
-43
lines changed

10 files changed

+61
-43
lines changed

plugins/advanced-alchemy.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ maintainers:
1515
compatibility:
1616
litestar: '>=2.0.0'
1717
icon: advanced-alchemy.png
18-
stars: 647
19-
monthly_downloads: 68514
20-
latest_version: 1.6.2
21-
updated_at: '2025-08-29T18:41:08'
18+
stars: 677
19+
monthly_downloads: 99841
20+
latest_version: 1.8.0
21+
updated_at: '2025-10-28T21:01:30'
2222
created_at: '2023-09-17T17:39:42'
2323
python_compatibility_raw: '>=3.9'
2424
python_compatibility:

plugins/litestar-asyncpg.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ maintainers:
1515
compatibility:
1616
litestar: '>=2.0.0'
1717
icon: litestar-asyncpg.svg
18-
stars: 10
19-
monthly_downloads: 388
18+
stars: 12
19+
monthly_downloads: 928
2020
latest_version: 0.5.0
2121
updated_at: '2025-06-24T16:45:09'
2222
created_at: '2023-10-01T23:31:27'

plugins/litestar-granian.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ compatibility:
1616
litestar: '>=2.0.0'
1717
icon: litestar-granian.png
1818
stars: 37
19-
monthly_downloads: 6656
19+
monthly_downloads: 10349
2020
latest_version: 0.14.2
2121
updated_at: '2025-08-06T19:54:57'
2222
created_at: '2023-10-02T01:42:04'

plugins/litestar-htmx.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ maintainers:
1515
compatibility:
1616
litestar: '>=2.0.0'
1717
icon: litestar-htmx.svg
18-
stars: 8
19-
monthly_downloads: 703443
18+
stars: 9
19+
monthly_downloads: 1009243
2020
latest_version: 0.5.0
2121
updated_at: '2025-06-11T21:19:45'
2222
created_at: '2024-10-20T17:49:03'

plugins/litestar-mcp.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ maintainers:
1515
compatibility:
1616
litestar: '>=2.0.0'
1717
icon: _default_icon.svg
18-
stars: 8
19-
monthly_downloads: 132
20-
latest_version: 0.1.0
21-
updated_at: '2025-09-06T19:14:20'
18+
stars: 2
19+
monthly_downloads: 63
20+
latest_version: 0.2.2
21+
updated_at: '2025-09-30T12:11:18'
2222
created_at: '2025-09-06T19:14:18'
2323
python_compatibility_raw: '>=3.9'
2424
python_compatibility:

plugins/litestar-oracledb.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ compatibility:
1616
litestar: '>=2.0.0'
1717
icon: litestar-oracledb.svg
1818
stars: 4
19-
monthly_downloads: 25
19+
monthly_downloads: 21
2020
latest_version: 0.2.0
2121
updated_at: '2024-09-04T20:30:03'
2222
created_at: '2024-08-29T19:33:20'

plugins/litestar-saq.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ maintainers:
1515
compatibility:
1616
litestar: '>=2.0.0'
1717
icon: _default_icon.svg
18-
stars: 23
19-
monthly_downloads: 8708
18+
stars: 25
19+
monthly_downloads: 13255
2020
latest_version: 0.5.3
2121
updated_at: '2025-05-05T14:54:31'
2222
created_at: '2023-10-04T03:57:48'

plugins/litestar-vite.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ compatibility:
1616
litestar: '>=2.0.0'
1717
icon: litestar-vite.svg
1818
stars: 25
19-
monthly_downloads: 6656
19+
monthly_downloads: 10349
2020
latest_version: 0.14.2
2121
updated_at: '2025-08-06T19:54:57'
2222
created_at: '2023-10-02T01:42:04'

plugins/sqlspec.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,16 @@ maintainers:
1515
compatibility:
1616
litestar: '>=2.0.0'
1717
icon: _default_icon.svg
18-
stars: 30
19-
monthly_downloads: 4962
20-
latest_version: 0.24.1
21-
updated_at: '2025-09-11T17:33:38'
18+
stars: 42
19+
monthly_downloads: 1791
20+
latest_version: 0.28.1
21+
updated_at: '2025-10-29T16:54:47'
2222
created_at: '2024-10-30T00:48:46'
23-
python_compatibility_raw: <4.0,>=3.9
23+
python_compatibility_raw: <4.0,>=3.10
2424
python_compatibility:
25-
raw: <4.0,>=3.9
26-
specifier_set: <4.0,>=3.9
25+
raw: <4.0,>=3.10
26+
specifier_set: <4.0,>=3.10
2727
compatible:
28-
- '3.9'
2928
- '3.10'
3029
- '3.11'
3130
- '3.12'

readmes/sqlspec.md

Lines changed: 37 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ SQLSpec is an experimental Python library designed to streamline and modernize y
1414
- **Emphasis on RAW SQL and Minimal Abstractions**: SQLSpec is a library for working with SQL in Python. Its goals are to offer minimal abstractions between the user and the database. It does not aim to be an ORM library.
1515
- **Type-Safe Queries**: Quickly map SQL queries to typed objects using libraries such as Pydantic, Msgspec, Attrs, etc.
1616
- **Extensible Design**: Easily add support for new database dialects or extend existing functionality to meet your specific needs. Easily add support for async and sync database drivers.
17-
- **Minimal Dependencies**: SQLSpec is designed to be lightweight and can run on its own or with other libraries such as `litestar`, `fastapi`, `flask` and more. (Contributions welcome!)
17+
- **Framework Extensions**: First-class integrations for Litestar, Starlette, and FastAPI with automatic transaction handling and lifecycle management
1818
- **Support for Async and Sync Database Drivers**: SQLSpec supports both async and sync database drivers, allowing you to choose the style that best fits your application.
1919

2020
### Experimental Features (API will change rapidly)
@@ -303,27 +303,51 @@ SQLSpec includes a built-in migration system for managing schema changes. After
303303

304304
```bash
305305
# Initialize migration directory
306-
sqlspec db init migrations
306+
sqlspec --config myapp.config init
307307

308308
# Generate new migration file
309-
sqlspec db make-migrations "Add user table"
309+
sqlspec --config myapp.config create-migration -m "Add user table"
310310

311311
# Apply all pending migrations
312-
sqlspec db upgrade
312+
sqlspec --config myapp.config upgrade
313313

314314
# Show current migration status
315-
sqlspec db show-current-revision
315+
sqlspec --config myapp.config show-current-revision
316316
```
317317

318318
For Litestar applications, replace `sqlspec` with your application command:
319319

320320
```bash
321321
# Using Litestar CLI integration
322-
litestar db make-migrations "Add user table"
323-
litestar db upgrade
324-
litestar db show-current-revision
322+
litestar database create-migration -m "Add user table"
323+
litestar database upgrade
324+
litestar database show-current-revision
325325
```
326326

327+
### Shell Completion
328+
329+
SQLSpec CLI supports tab completion for bash, zsh, and fish shells. Enable it with:
330+
331+
```bash
332+
# Bash - add to ~/.bashrc
333+
eval "$(_SQLSPEC_COMPLETE=bash_source sqlspec)"
334+
335+
# Zsh - add to ~/.zshrc
336+
eval "$(_SQLSPEC_COMPLETE=zsh_source sqlspec)"
337+
338+
# Fish - add to ~/.config/fish/completions/sqlspec.fish
339+
eval (env _SQLSPEC_COMPLETE=fish_source sqlspec)
340+
```
341+
342+
After setup, you can tab-complete commands and options:
343+
344+
```bash
345+
sqlspec <TAB> # Shows: create-migration, downgrade, init, ...
346+
sqlspec upgrade --<TAB> # Shows: --bind-key, --help, --no-prompt, ...
347+
```
348+
349+
See the [CLI documentation](https://sqlspec.litestar.dev/usage/cli.html) for complete setup instructions.
350+
327351
### Basic Litestar Integration
328352

329353
In this example we demonstrate how to create a basic configuration that integrates into Litestar:
@@ -337,23 +361,18 @@ In this example we demonstrate how to create a basic configuration that integrat
337361
# ///
338362

339363
from litestar import Litestar, get
340-
364+
from sqlspec import SQLSpec
341365
from sqlspec.adapters.aiosqlite import AiosqliteConfig, AiosqliteDriver
342-
from sqlspec.extensions.litestar import DatabaseConfig, SQLSpec
343-
366+
from sqlspec.extensions.litestar import SQLSpecPlugin
344367

345368
@get("/")
346369
async def simple_sqlite(db_session: AiosqliteDriver) -> dict[str, str]:
347370
return await db_session.select_one("SELECT 'Hello, world!' AS greeting")
348371

349372

350-
sqlspec = SQLSpec(
351-
config=DatabaseConfig(
352-
config=AiosqliteConfig(pool_config={"database": ":memory:"}), # built in local pooling
353-
commit_mode="autocommit"
354-
)
355-
)
356-
app = Litestar(route_handlers=[simple_sqlite], plugins=[sqlspec])
373+
sqlspec = SQLSpec()
374+
sqlspec.add_config(AiosqliteConfig(pool_config={"database": ":memory:"}))
375+
app = Litestar(route_handlers=[simple_sqlite], plugins=[SQLSpecPlugin(sqlspec)])
357376
```
358377

359378
## Inspiration and Future Direction

0 commit comments

Comments
 (0)