DuckDB cursor wrapper
Project description
DuckDB-Cursor
DuckDB-Cursor is simple DuckDB wrapper.
Install
First install library,
pip install duckdb-cursor
Usage
Create an CURSOR object,
from duckdb import connect
from duckdb_cursor import CURSOR
cur = CURSOR(connect("db.duckdb"))
cur.set("INSERT INTO users VALUES(1, ?);", ('Wendys', ))
del cur
can select one row,
cur = CURSOR(connect("db.duckdb"))
row = cur.get("SELECT name FROM users WHERE id=1;", as_dict=True, one=True)
del cur
print(row['name'])
can select all rows,
cur = CURSOR(connect("db.duckdb"))
rows = cur.get("SELECT name FROM users;")
del cur
print(rows)
Contributing
DuckDB-Cursor is developed on GitLab. You are very welcome to open issues or propose merge requests.
Help
This README is the best place to start, after that try opening an issue.
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
duckdb-cursor-0.2.tar.gz
(14.8 kB
view hashes)
Built Distribution
Close
Hashes for duckdb_cursor-0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4b590f06cbf5ad98715363e4e633e3168edaf37ded2726859c5a5239bdf217a8 |
|
MD5 | 7f852a6591492496ff3b60e4d7f2aff7 |
|
BLAKE2b-256 | e9961a7114b50887b3f8cf39b92a234f5bccacf1a9c79aa42a9d9227c79333b2 |