This is a fork of the original libsql-experimental-python project.
Caution
This is a work in progress and is not yet ready for production use.
Note
This package is not yet available on PyPI and must be installed from source.
Easiest way to install is to clone the repository, source the virtual environment
and run maturin develop
.
git clone https://github.com/sveltespot/pylibsql.git
cd pylibsql
python3 -m venv ~/.venv
source ~/.venv/bin/activate
pip install maturin
maturin develop
import pylibsql
con = pylibsql.connect("hello.db", sync_url="http://localhost:8080", auth_token="")
con.sync()
cur = con.cursor()
cur.execute("CREATE TABLE IF NOT EXISTS users (id INTEGER, email TEXT);")
cur.execute("INSERT INTO users VALUES (1, 'penberg@iki.fi')")
print(cur.execute("SELECT * FROM users").fetchone())
- Python 3.7+ with pip and venv (Install python-dev package for your distribution)
- Rust toolchain
- maturin (install with
pip install maturin
)
maturin develop