Data#
Data sources and the col filter language. A data source owns a set of records
and serves them a page at a time, so a data-bound widget works the same whether
the records live in memory, a SQLite database, or a file on disk.
For a task-oriented introduction — when to reach for each source, the data bag, observing changes, exporting — see the Data Sources guide.
Data sources#
The concrete sources, the file-source config object, and the base class and protocol for writing your own.
In-memory data manager with pagination, filtering, sorting, and CRUD operations. |
|
SQLite-backed data manager with pagination, filtering, sorting, and CRUD operations. |
|
A |
|
Configuration for file parsing and the per-record transformation pipeline. |
|
Abstract base class for datasource implementations. |
|
Protocol defining the interface for data source implementations. |
Query language#
The col expression API for building filter conditions and sort keys, free of
SQL. Call these to construct a query, then pass conditions to a source’s
where() and sort keys to order().
Query expression types#
The objects the query API produces and that where() / order() accept —
handy for type annotations. You rarely construct these directly; build them from
col and the comparison operators.
Readers and writers#
The pluggable format registries behind FileDataSource and a source’s
save(). Register a reader or writer to teach the framework a new file format.
Stream records from a file, choosing the reader by format or extension. |
|
Write records to a file, choosing the writer by |
|
Resolve the reader for a path or extension. |
|
Resolve the writer for a path or extension. |
|
Register a reader for one or more file extensions. |
|
Register a writer for one or more file extensions (decorator or direct). |
|
Return the sorted list of registered readable file extensions. |
|
Return the sorted list of registered writer extensions. |
Type aliases#
The record and cell types shared across the module.
- type bootstack.data.Primitive#
A single scalar cell value —
str | int | float | bool | None.
- type bootstack.data.Record#
One data row, keyed by field name —
dict[str, Any].