sqlalchemyseed.aio ================== .. py:module:: sqlalchemyseed.aio .. autoapi-nested-parse:: Async wrappers around the synchronous seeders. These bridge the existing sync-only seeder logic onto an ``AsyncSession`` using :meth:`~sqlalchemy.ext.asyncio.AsyncSession.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 --------------- .. py:class:: AsyncHybridSeeder(session: sqlalchemy.ext.asyncio.AsyncSession, ref_prefix: str = '!') Async counterpart of :class:`~sqlalchemyseed.seeder.HybridSeeder`. The hybrid seeder issues queries (``filter`` keys) *during* the seed traversal, so it genuinely needs a live connection; ``run_sync`` supplies a real sync ``Session`` whose queries are proxied to the async driver. .. py:method:: seed(entities: Union[list, dict]) :async: .. py:property:: instances :type: tuple .. py:attribute:: ref_prefix :value: '!' .. py:attribute:: session .. py:class:: AsyncSeeder(session: sqlalchemy.ext.asyncio.AsyncSession, ref_prefix: str = '!') Async counterpart of :class:`~sqlalchemyseed.seeder.Seeder`. .. py:method:: seed(entities: Union[list, dict], add_to_session: bool = True) :async: .. py:property:: instances :type: tuple .. py:attribute:: ref_prefix :value: '!' .. py:attribute:: session