sqlalchemyseed.aio¶
Async wrappers around the synchronous seeders.
These bridge the existing sync-only seeder logic onto an AsyncSession
using run_sync(), which runs the
sync code inside a greenlet where the driver’s blocking I/O is translated
into await calls.
No parallel async reimplementation of the traversal is needed.
Module Contents¶
- class sqlalchemyseed.aio.AsyncHybridSeeder(session: sqlalchemy.ext.asyncio.AsyncSession, ref_prefix: str = '!', strict: bool = False)¶
Async counterpart of
HybridSeeder.The hybrid seeder issues queries (
filterkeys) during the seed traversal, so it genuinely needs a live connection;run_syncsupplies a real syncSessionwhose queries are proxied to the async driver.strictis forwarded as-is to the wrapped syncHybridSeeder.- ref_prefix = '!'¶
- session¶
- strict = False¶