Skip to main content

Asqueel

Asqueel

Define SQL models in Python, compile parameterized queries, and work with PostgreSQL through a synchronous API. Asqueel keeps logical names, physical database names, relationships, and column UI metadata in a shared model.

The developer manual describes the intended delivery contract, including designed features. See Current status for implementation availability and open decisions.

Install

python -m pip install "asqueel[postgresql]"

Use asqueel for model building and offline compilation only. Add the migration extra to use the separate schema migration integration. From a checkout, run python -m pip install -e ".[postgresql]" in the repository root.

Build an application database

Declare the model and connection configuration in one recipe:

from asqueel import SqlDatabaseConfig, build_database


class Shop(SqlDatabaseConfig):
    def main(self, root):
        db = root.db("shop", conninfo="dbname=shop")
        customer = db.schemas().schema("sales").tables().table("customer", pkey="id")
        columns = customer.columns()
        columns.column("id", dtype="L")
        columns.column("name", dtype="T", x_ui={"label": "Customer name"})


with build_database(Shop) as db:
    customer = db.table("sales.customer")
    query = customer.query(
        columns="$id, $name", where="$id >= :minimum_id",
        params={"minimum_id": 1}, order_by="$id",
    )
    print(query.sqltext)  # Compiles without opening a connection.

Against an existing sales.customer table, call query.fetch() to get a list of dictionaries. Table writes and reads share a lazy session. Use db.commit() and db.rollback(), or group operations with with db.transaction():. Closing the database rolls back pending work; with db: does not commit it.

Construction does not connect or create tables. The runnable quickstart includes explicit disposable schema setup and cleanup. Configuration explains layered recipes and live table objects. The separate compiler and low-level runtime remain available for advanced integrations.

Query expressions are application code; pass external values through parameters rather than SQL interpolation.

Learn and use Asqueel

Start with What is Asqueel? and the object model, run the quickstart, then follow the customers and invoices tutorial. The tutorial includes a complete runnable script with assertions, transaction examples and disposable-schema cleanup.

You want to… Read
Configure an application and render live objects Configuration
Declare names, relations, aliases and UI metadata Models
Read data or load exactly one record Queries
Insert, update or delete Writes and transactions
Add business behavior Table hooks
Define computed values and correlated subqueries Formulas
Scope data by organization, draft or deletion state Environment and row policies
Start from an existing database or manage its schema Importing and migrations
Come from Genropy For Genropy users, including agreed differences
Come from SQLAlchemy For SQLAlchemy users
Come from Django For Django users
Come from Peewee For Peewee users
Look up a call or diagnose a problem API cheat sheet and troubleshooting

For advanced integration, see cascading grammars, the compiler, low-level execution and adapters.

The public Sphinx site contains these English guides and the API reference. To build it locally:

python -m pip install -e ".[docs]"
python -m sphinx -W --keep-going -b html docs docs/_build/html

Open docs/_build/html/index.html. Internal design notes remain in the repository and are excluded from the public documentation build.

Development checkout

For development with the migration integration, install its checkout and Asqueel with the development dependencies (replace the example path with your checkout):

pip install -e "../asqueel-migration[postgresql,validation]" -e ".[dev]"

License

Apache License 2.0 — Copyright Softwell S.r.l.

Metadata

Release files for asqueel 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for asqueel 0.1.0
File Size Uploaded
asqueel-0.1.0.tar.gz 2.3 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for asqueel 0.1.0
File Interpreter ABI Platform
asqueel-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 2.4 MB

Release files / asqueel-0.1.0.tar.gz

Download URL asqueel-0.1.0.tar.gz
Size 2.3 MB
Tags Source
SHA-256 checksum
How to use checksums
37ddc8dd1541eacaf2de288df7db9f71e20cd9f5bbe6a2cd397a410c47bbddeb
BLAKE2b-256 checksum
How to use checksums
f03257b16363e34b4fac77bad4a3eb7db6615488dad2f689abdf55e7c39d3b53
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 30, 2026.

Transparency log

Release files / asqueel-0.1.0-py3-none-any.whl

Download URL asqueel-0.1.0-py3-none-any.whl
Size 89.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d98ec74bdd9dfeba8bca5ae5a24174a88e0c7a8d79eea4783a63676fcc683b47
BLAKE2b-256 checksum
How to use checksums
74cb78836986cfdaa40ac2f374024637cfd55b5df22b8a47a069d937c17b98d8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 30, 2026.

Transparency log

Release history Release notifications | RSS feed

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.1

2 release files

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page