Skip to main content

sqld client for Python

Project description

sqld client for Python

This is a Python client for sqld, the server mode for libSQL that powers Chiselstrike Turso.

Getting started

To get started, you need sqld running somewhere. Then you can install this package with:

$ pip install libsql-client

and use it like this:

import asyncio
import libsql_client

async def main():
    url = "http://localhost:8080"
    async with libsql_client.Client(url) as client:
        result_set = await client.execute("SELECT * from users")
        print(len(result_set.rows), "rows")
        for row in result_set.rows:
            print(row)

asyncio.run(main())

You can also connect to a local SQLite database simply by changing the URL:

url = "file:example.db"

Contributing to this package

First, please install Python and [Poetry][poetry]. To install all dependencies for local development to a virtual environment, run:

poetry install -G dev

To run the tests, use:

poetry run pytest

To check types with MyPy, use:

poetry run mypy

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

libsql-client-0.1.0.tar.gz (5.7 kB view hashes)

Uploaded Source

Built Distribution

libsql_client-0.1.0-py3-none-any.whl (7.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page