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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file libsql-client-0.1.0.tar.gz.
File metadata
- Download URL: libsql-client-0.1.0.tar.gz
- Upload date:
- Size: 5.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.0 CPython/3.10.6 Linux/5.15.0-58-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
18d0cc1c0aec7ce94fd3e01d06529add5e46e934e1c45ec2be50118a6781e81f
|
|
| MD5 |
3a35c58930daaed3797458dbbec6c115
|
|
| BLAKE2b-256 |
5c40121e9f05ac08f69d3a18bad2413f6365ba8eee61bdbca8dd426f2e25f927
|
File details
Details for the file libsql_client-0.1.0-py3-none-any.whl.
File metadata
- Download URL: libsql_client-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.0 CPython/3.10.6 Linux/5.15.0-58-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f617d2709d037d22cd9ff98df7c24a1d7af9b3705eb03cdfe4711d1cd12461b9
|
|
| MD5 |
34f609481c893847be9be5df4a153e54
|
|
| BLAKE2b-256 |
d4e3385f04c9c5bbc8536c3d8841050e115e23eca8f9e0e2a707486db4903f40
|