- Add
BaseQuery.aexecute()- an async twin ofexecute()available on all query types, executing through the query's bound async database:await User.select().aexecute(),await user.tweets.aexecute(). Returns exactly whatexecute()returns, including result rows for DML withRETURNING. Queries remain non-awaitable; this is an ordinary coroutine method and the only async method on queries. - Add async model methods to
playhouse.pwasynciousing "a"-prefixed coroutine counterparts of the row-levelModelmethods (acreate,aget,aget_or_none,aget_by_id,aget_or_create,aset_by_id,adelete_by_id,abulk_create,abulk_update,asave,adelete_instance), available via the newAsyncModel/AsyncModelMixinclasses. Each is a thin delegation through the greenlet bridge, so behavior is identical to the synchronous implementation. Note: theModelproperty of async databases now returns a base class that includes these methods - relevant only if you introspect the base class ofdb.Modelsubclasses. - Add
afetch()for explicit, awaitable lazy foreign-key resolution:user = await tweet.afetch(Tweet.user). Already-loaded relations (via join or prefetch) return immediately without a query. - Add
db.first(query, n=1)async helper. MissingGreenletBridgeerrors now include a hint describing the async APIs to use.- The asyncio extension is no longer considered preliminary - the async APIs documented in the docs are stable. The asyncio stress test now also runs in CI.
