Last active
February 13, 2025 20:19
-
-
Save amotl/0122692517a1ec74c44a6c266b6644e8 to your computer and use it in GitHub Desktop.
Validate CrateDB SQLAlchemy connect timeout
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment