Skip to content

v0.0.1

Choose a tag to compare

@github-actions github-actions released this 14 Dec 18:39
· 25 commits to main since this release

πŸš€ Added

First public release: SQL as Jinja templates with safe value serialization, executed through adapters you plug in.

  • Query: a SQL template (inline text or a file) bound to a result model; renders with parameters and wraps rows into Result (get(), get_list(), raw rows).
  • SQLBase: declares the adapters of a project; with_params() collects template parameters, SQL(query).postgres.execute() runs the query through the chosen adapter.
  • Adapter / AdapterDescriptor: the glue to a real connection; a subclass provides _execute() and a serializer.
  • Serializers: BaseSerializer with serialize_value for None, bool, numbers, Decimal, str, UUID, date, datetime and collections, plus PostgresSerializer (::uuid, ::timestamp, ::date casts) and ClickhouseSerializer (toUUID, parseDateTimeBestEffort, toDate). serialize_value is available inside templates.

Supports Python 3.9–3.14, ships py.typed.