Skip to content

Query

Query

Bases: BaseModel

A Query is a Pydantic class representing a rAPId compatible data query. It allows for programmatic definition of data queries. See the rAPId specific documentation on how to write a valid query.

Example

A query can created by setting the values literally into the class like::

query = Query(
    select_columns=["column_a", "column_b"],
    limit="5"
)

The alternative is you can create a schema directly from a Python dictionary::

query = Query(
    **{
        "select_columns": ["column_a", "column_b"],
        "limit": "5"
    }
)