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
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 duckdb-cursor-0.2.tar.gz.
File metadata
- Download URL: duckdb-cursor-0.2.tar.gz
- Upload date:
- Size: 14.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9d76bb1590375c264e76101880ca1ce63b50043432da36b4f74af74b58be9f16
|
|
| MD5 |
9ecaf201f2a56c5dafff5b5aec9755d1
|
|
| BLAKE2b-256 |
2d10d645cfb13e8d80f0f6a6cd7d723d6f3ab8dfc7fcd753047671b912598f21
|
File details
Details for the file duckdb_cursor-0.2-py3-none-any.whl.
File metadata
- Download URL: duckdb_cursor-0.2-py3-none-any.whl
- Upload date:
- Size: 15.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4b590f06cbf5ad98715363e4e633e3168edaf37ded2726859c5a5239bdf217a8
|
|
| MD5 |
7f852a6591492496ff3b60e4d7f2aff7
|
|
| BLAKE2b-256 |
e9961a7114b50887b3f8cf39b92a234f5bccacf1a9c79aa42a9d9227c79333b2
|