-
Notifications
You must be signed in to change notification settings - Fork 24
Description
Attempting to work with libsql/Turso in python creates quite a few issues:
1) libsql_client vs libsql
While it looks like libsql is the recommended way to do things now, there are still references to libsql_client scattered throughout both the docs and on Turso's site. It's really unclear as to which is preferred until one discovers that libsql_client git repo has been archived. This strikes me as just cleanup that Turso/libsql maintainers need to do so that newcomers such as myself don't spend hours trying to figure out what to do.
2) libsql-python abandoned async
As far as all of this goes, the bindings for js seem to be async, but the bindings for python seem to be synchronous - and blocking - unlike the older version of libsql-client. This is somewhat obnoxious for non-local dbs, such as those hosted by Turso, where a network roundtrip is included and many of the current web frameworks for python are ASGI/async. The example provided could, in theory, block the main loop if the connection times out or becomes unavailable.
While all of this could be wrapped in asyncio.create_task() statements to handle all the fun stuff, it seems odd that this was available but is now excluded
2) Stale documentation
Just that. Mixed references all over the place. Needs cleanup.