Skip to content

Releases: h0rn3t/fastapi-async-sqlalchemy

WIP multi sessions

18 Oct 22:32
5b36546
Compare
Choose a tag to compare
WIP multi sessions Pre-release
Pre-release

WIP multi sessions

@router.get("/concurrent-queries")
async def parallel_select():
    async with db(multi_sessions=True):
        async def execute_query(query):
            return await db.session.execute(text(query))

        tasks = [
            asyncio.create_task(execute_query("SELECT 1")),
            asyncio.create_task(execute_query("SELECT 2")),
            asyncio.create_task(execute_query("SELECT 3")),
            asyncio.create_task(execute_query("SELECT 4")),
            asyncio.create_task(execute_query("SELECT 5")),
            asyncio.create_task(execute_query("SELECT 6")),
        ]

        await asyncio.gather(*tasks)

0.6.1

17 Jan 11:42
3239a54
Compare
Choose a tag to compare
Update python-publish.yml

0.6.0

05 Sep 21:13
2a9dd8f
Compare
Choose a tag to compare
0.6.0 Pre-release
Pre-release
  • use multiple databases

0.5.0

16 Aug 06:34
Compare
Choose a tag to compare
  • fixed session.close() on exception
  • support sqlalchemy>1.4.18,sqlalchemy>2.0.0
  • use sqlalchemy<=1.4.41 for sqlmodel

0.3.14

12 Mar 20:17
Compare
Choose a tag to compare
  • tested with sqlmodel==0.0.8
  • fixed tests

03.12

31 Jul 11:35
Compare
Choose a tag to compare
  • Added _init_session method

0.3.11

08 Apr 10:50
Compare
Choose a tag to compare
  • context manager fix
  • upgrade black version

0.3.10

13 Nov 16:39
Compare
Choose a tag to compare

pytest update

0.3.9

22 Oct 22:04
Compare
Choose a tag to compare
  • added pre-commit
  • refactoring

0.3.8

17 Sep 15:32
9cbf449
Compare
Choose a tag to compare

security update