This release is a pre-release and may not be stable for production use.
Async port of Apache Superset — the same BI platform, rebuilt from Flask/WSGI onto Litestar/ASGI.
Drop-in replacement for the Apache Superset 6.0.0 backend. Keep the same metadata database, the same REST API, the same WebSocket contract and the same frontend — only the web layer becomes async. Stop Superset, start Liteset on top of the same database, and keep working with the same dashboards, datasets, users and roles.
⚡ Performance
On identical hardware, against an IO-bound analytical workload (Star Schema Benchmark at Scale Factor 10, ~60 M rows, a deliberately constrained PostgreSQL), swapping the sync backend for the async one delivers:
- 8.3× higher throughput — 10.57 vs 1.27 RPS under a 200-user dashboard fan-out
- 29.8× lower median response time — 4.5 s vs 134 s in the same run
- up to 10× more throughput as I/O latency grows — the regime BI platforms actually live in
- error rate down from 32.8 % → 7.4 %, while infrastructure endpoints (login, CSRF) stay responsive instead of degrading by two orders of magnitude
Dashboard Fan-Out throughput across the run (figure from the testing report).
The cost is a modest +5 % resident memory — the async runtime keeps coroutine state and an asyncpg pool in one process instead of pre-forking workers. See the full benchmark report for all three scenarios, and the methodology for the test bench.
Table of contents
- Performance
- Why Liteset
- Target architecture
- Technology stack
- Compatibility guarantees
- Project layout
- Installation and running
- License
Why Liteset
Historically Apache Superset is built on Flask/WSGI and runs under Gunicorn with pre-forked processes. This model has three fundamental limitations:
- Blocking I/O. During long-running queries against analytical databases the worker process sits idle waiting for a response and does not serve other requests.
- High memory footprint. Every worker process copies the whole application and maintains its own metadata-database connection pool.
- Limited concurrency. The number of concurrent requests is hard-capped by processes × threads.
Liteset removes these bottlenecks by moving the entire web layer to the async ASGI model. The measured outcome on IO-bound workloads is the multi-fold throughput and tail-latency gains shown above, at a single-digit memory cost — see the benchmark report.
Target architecture
The Liteset server is designed along Clean Architecture lines. The application is split into four layers; dependencies point strictly inward — inner layers never import from outer ones.
| Layer | Responsibility | Implementation |
|---|---|---|
| Presentation | Controllers, DTOs, serialization, authorization predicates | superset/controllers/, superset/schemas/, superset/guards/ — async def Litestar handlers, DTOs built on msgspec.Struct, Guards for RBAC |
| Business Logic | Business rules (validate() → run()) |
superset/commands/ — AsyncBaseCommand, framework-independent Command classes |
| Data Access | Data access through the SQLAlchemy 2.0 Select API | superset/db/base_dao.py, superset/db/daos/ — BaseAsyncDAO[T] with an AsyncSession in the constructor |
| Infrastructure | Middleware, DI, configuration, DB engine | superset/middleware/, superset/dependencies.py, superset/config.py |
Technology stack
| Category | Component | Role |
|---|---|---|
| ASGI framework | Litestar | Routing, DI, OpenAPI, Guards, Middleware |
| ASGI server | Uvicorn + uvloop | libuv-based event loop |
| ORM | SQLAlchemy 2.0 (Async) | Declarative models, database queries |
| Metadata driver | asyncpg / aiosqlite | Async access to the metadata DB |
| Serialization | msgspec | DTOs + validation, replaces Marshmallow and Pydantic v1 |
| Configuration | pydantic-settings | Typed configuration with backward compatibility for superset_config.py |
| Migrations | Alembic (psycopg2, sync) | DB schema is inherited 1:1 from Superset 6.0.0 |
| Background jobs | Celery | Left unchanged (orthogonal to the HTTP layer) |
| WebSocket | Native Litestar | Replaces the standalone Node.js superset-websocket service |
| Cache | Redis (redis-py async) | Per-request cache, auth user cache, async events |
| Logging | structlog | Structured JSON logs |
Compatibility guarantees
Liteset is a drop-in replacement for Apache Superset 6.0.0 at the backend level. Three invariants are locked in:
1. Metadata database
The schema of the metadata tables (ab_user, ab_role, dashboards, slices, tables, dbs, query, saved_query, report_schedule, etc.) is inherited from Apache Superset 6.0.0 — models, column names and types are unchanged, so an existing Superset database is read and written by Liteset as-is.
The Alembic history, however, is not carried over: upstream's 339 revisions are squashed into a single initial revision (c233f5365c9e), and Liteset adds its own on top. Two consequences:
- The metadata database must already be at upstream head
c233f5365c9e(the 2025-08-05 release). If it is older, run the upstream chain to that revision first, using a legacy Apache Superset install. - Once it is,
alembic upgrade headis required — Liteset's own revisions apply DDL drift corrections. It is not a zero-migration swap.
See superset/migrations/README.md for the exact procedure.
2. Frontend
The frontend code (superset-frontend/) must not be modified. Liteset is obliged to reproduce every endpoint, JSON response shape, session cookie format (Flask-signed session cookies are decoded natively), CSRF tokens (X-CSRFToken), rison request parameters and the /superset/welcome SPA template.
3. HTTP API
All REST controllers reproduce the Superset contract 1:1 — URL routes, response codes, field names (dual camelCase/snake_case lookup is supported on the msgspec side), pagination shape, SIP-40 errors, Swagger spec layout. OpenAPI docs are auto-generated at /swagger/v1.
Project layout
liteset/
├── superset/ # Async backend on Litestar
│ ├── app.py # Litestar application factory
│ ├── config.py # SupersetSettings (pydantic-settings)
│ ├── dependencies.py # DI Provide's (session, user, security_manager)
│ ├── exceptions.py # SIP-40 hierarchy + handlers
│ ├── controllers/ # Presentation layer — 45 controllers
│ │ ├── base.py # RISON helpers, pagination, serialization
│ │ ├── chart.py, dashboard.py, database.py, dataset.py, …
│ │ └── sqllab.py, report.py, security.py, user.py, …
│ ├── commands/ # Business Logic layer
│ │ ├── base.py # AsyncBaseCommand (validate/run)
│ │ └── chart.py, dashboard.py, database.py, …
│ ├── db/
│ │ ├── session.py # AsyncEngine, async_sessionmaker
│ │ ├── base_dao.py # BaseAsyncDAO[T]
│ │ ├── daos/ # Data Access layer
│ │ │ ├── chart.py, dashboard.py, database.py, …
│ │ │ └── security.py, user.py, …
│ │ └── engine_specs/ # Async DB adapters
│ │ ├── base.py # BaseAsyncEngineSpec
│ │ ├── postgres.py # Native asyncpg
│ │ ├── mysql.py # Native asyncmy
│ │ ├── clickhouse.py # aiochclient
│ │ ├── trino.py # aiotrino
│ │ └── sync_fallback.py # Wrapper for other DBs via conn.run_sync()
│ ├── guards/ # RBAC Guards
│ ├── middleware/ # Auth, CSRF, locale, security headers, proxy fix
│ ├── schemas/ # DTOs on msgspec.Struct
│ ├── security/ # AsyncSecurityManager (FAB port)
│ ├── async_events/ # Redis-streams-based async events
│ ├── websocket/ # Native Litestar WebSocket
│ ├── common/ # QueryContext/QueryObject
│ ├── models/ # SQLAlchemy 2.0 declarative models
│ ├── migrations/ # Alembic (psycopg2, sync)
│ ├── db_engine_specs/ # Sync BaseEngineSpec (for SQL dialects)
│ ├── sql/ # SQL parser, Jinja templating
│ ├── viz.py # Legacy viz engine (explore_json)
│ └── static/, templates/ # SPA bundle, Jinja templates
├── superset-frontend/ # React frontend (not modified)
├── tests/ # pytest
├── requirements/ # base.in, development.in, …
└── pyproject.toml
Installation and running
See the Liteset quickstart guide or explore the production deployment options.
License
Liteset is distributed under the Apache License 2.0, inherited from Apache Superset. All files carried over from Apache Superset 6.0.0 preserve their original ASF headers. See LICENSE.txt in the repository root.
Liteset is an academic port; the author may have missed important details that cause regressions relative to Apache Superset 6.0.0. For production installations, keep using apache/superset.
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 liteset-1.0.0rc1.tar.gz.
File metadata
- Download URL: liteset-1.0.0rc1.tar.gz
- Upload date:
- Size: 47.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b9f8f4788a6c76d8bba261a09b776ddb883d6be26dbee819efca8d771c2a54f6
|
|
| MD5 |
4b03fb07271d05df80f6cd667177df00
|
|
| BLAKE2b-256 |
0abdc90318c8be2738fee93b13b3f88c1b8a946a98344295db97b7e2f50455f7
|
Provenance
The following attestation bundles were made for liteset-1.0.0rc1.tar.gz:
Publisher:
tag-release.yml on happykust/liteset
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
liteset-1.0.0rc1.tar.gz -
Subject digest:
b9f8f4788a6c76d8bba261a09b776ddb883d6be26dbee819efca8d771c2a54f6 - Sigstore transparency entry: 2649527523
- Sigstore integration time:
-
Permalink:
happykust/liteset@104d4d3fafef09f8cf818abe235b56975e3099db -
Branch / Tag:
refs/tags/1.0.0rc1 - Owner: https://github.com/happykust
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
tag-release.yml@104d4d3fafef09f8cf818abe235b56975e3099db -
Trigger Event:
release
-
Statement type:
File details
Details for the file liteset-1.0.0rc1-py3-none-any.whl.
File metadata
- Download URL: liteset-1.0.0rc1-py3-none-any.whl
- Upload date:
- Size: 48.1 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b4ffc38c79f9bd5a677d45c6c592a463442584fbe0504dbe769d370652f362f3
|
|
| MD5 |
f7f2547a0bb3ca90e9fd75155b595f0f
|
|
| BLAKE2b-256 |
e478b25aa791d70efe0d0b72dcd4b279705822e77b362e6337d8d8785efd0b90
|
Provenance
The following attestation bundles were made for liteset-1.0.0rc1-py3-none-any.whl:
Publisher:
tag-release.yml on happykust/liteset
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
liteset-1.0.0rc1-py3-none-any.whl -
Subject digest:
b4ffc38c79f9bd5a677d45c6c592a463442584fbe0504dbe769d370652f362f3 - Sigstore transparency entry: 2649527666
- Sigstore integration time:
-
Permalink:
happykust/liteset@104d4d3fafef09f8cf818abe235b56975e3099db -
Branch / Tag:
refs/tags/1.0.0rc1 - Owner: https://github.com/happykust
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
tag-release.yml@104d4d3fafef09f8cf818abe235b56975e3099db -
Trigger Event:
release
-
Statement type: