01 / MODEL
More than tables
and columns.
Relationships, aliases, formula columns and hierarchies give your data a vocabulary that queries can reuse.
Meet Asqueel JS
Asqueel is written in Python. Asqueel JS is its JavaScript counterpart, with models, queries, calculations and writes — including schema migrations.
A shared model structure and the same conventions let you reuse query expressions in Python and JavaScript. The language changes; the way you describe and query your data stays familiar.
Gramlot is the first application framework to put Asqueel JS to work, bringing the Python model into the browser.
Two languages. A shared model.
Familiar capabilities
Use the same table names, relationship paths and query conventions in both environments: $column for a field, @relation.column for a related value.
01 / MODEL
Relationships, aliases, formula columns and hierarchies give your data a vocabulary that queries can reuse.
02 / QUERY
Follow relationship paths, filter and sort records, build subqueries and aggregate related data with familiar Asqueel expressions.
03 / WRITE
Insert, update and delete records. Use JavaScript hooks, transactions and rollback, or import data from CSV, JSON and TYTX.
Migration is included
Asqueel JS reads the actual SQLite structure and compares it with the model. It produces a migration plan, applies supported changes and checks the resulting schema.
That is how a browser can prepare its local database from a structure defined in Python — before receiving any records.
CompareRead the model and the existing SQLite schema.
Plan & applyCreate tables and add supported columns and indexes.
VerifyRead the schema again and check that it matches.
In practice · taking orders offline
A sales representative needs the customer list, the catalogue and a way to take an order. The work should continue when the connection stops.
The Python application sends the model Source to Gramlot in the browser. Asqueel JS prepares SQLite, then loads the representative’s customers, products and prices.
Without a connection, the representative looks up products and records orders and their lines. Queries and writes run against the local SQLite database.
The offline app retains both the model and the data. Close it, reopen it and continue working with the orders already collected.
When a connection is available, the application sends the collected orders to Python for validation and recording in the central database.
The central database can be PostgreSQL. The browser works with a portable SQLite version of the selected model and data. The application decides what to send and how to accept the returned orders.
Another application · a condominium meeting
An owners’ meeting works with a small, well-defined set of data. An application built with Asqueel JS and Gramlot could bring that data into the room and keep the meeting moving without a reliable connection.
01 / BEFORE THE MEETING
Send the model and the records needed for this meeting: owners, units, ownership shares, the budget, proposed resolutions and relevant documents. SQLite is prepared locally before the meeting starts.
02 / IN THE ROOM
Register attendance, record votes and check quorum using the rules configured for the meeting. Draft the minutes, add notes and attach documents. The application works against the local database throughout.
03 / AFTER THE MEETING
Export attendance, votes, resolutions, minutes and attachments. When connected, the application can return this package to the central system for validation and recording.
Attendance totals, ownership shares and quorum checks expressed with supported model formulas can run in both environments, without implementing the calculations twice. The application defines the voting rules. This workflow needs a coherent starting dataset and a completed result to return; continuous synchronization is not required.
The first adopter
Gramlot is the first application framework to use Asqueel JS. Asqueel JS handles the model and SQLite; Gramlot provides the application interface. Together they support a working offline application, including a self-contained HTML export with SQLite built in.
The repository includes a working Python-to-browser transfer example, local editing and export back to Python.
Install the JavaScript package:
npm install @asqueel/asqueel-js
Compatibility covers the model structure, query expressions and conventions implemented in both runtimes, with tests against Python. You can reuse those expressions while calling them through Python or JavaScript syntax. This does not imply identical language syntax or coverage of every Python API. Python functions and classes stay on the server; application hooks used locally are written in JavaScript.
Read the capability matrix ↗Create tables with keys and relationships, add nullable columns and supported indexes. Changes that need table rebuilding or unsupported alterations are reported and block application of the plan.
Explore the migration implementation ↗Source and data transfer are available today. Automatic synchronization, duplicate detection and conflict resolution belong to the application. The Python receiver can load a returned snapshot into a separate SQLite database for inspection before integration.