Skip to content

Instantly share code, notes, and snippets.

@amotl
Last active February 13, 2025 20:19
Show Gist options
  • Select an option

  • Save amotl/0122692517a1ec74c44a6c266b6644e8 to your computer and use it in GitHub Desktop.

Select an option

Save amotl/0122692517a1ec74c44a6c266b6644e8 to your computer and use it in GitHub Desktop.

Revisions

  1. amotl renamed this gist Feb 13, 2025. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. amotl created this gist Feb 12, 2025.
    9 changes: 9 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    import sqlalchemy as sa

    TIMEOUT = 0.00001

    if __name__ == "__main__":
    engine = sa.create_engine('crate://localhost/', connect_args={"timeout": TIMEOUT})
    c = engine.connect()
    result = c.execute(sa.text("SELECT 42;"))
    print(result.all())