Skip to main content

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


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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

duckdb_cursor-0.2-py3-none-any.whl (15.1 kB view details)

Uploaded Python 3

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

Hashes for duckdb-cursor-0.2.tar.gz
Algorithm Hash digest
SHA256 9d76bb1590375c264e76101880ca1ce63b50043432da36b4f74af74b58be9f16
MD5 9ecaf201f2a56c5dafff5b5aec9755d1
BLAKE2b-256 2d10d645cfb13e8d80f0f6a6cd7d723d6f3ab8dfc7fcd753047671b912598f21

See more details on using hashes here.

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

Hashes for duckdb_cursor-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4b590f06cbf5ad98715363e4e633e3168edaf37ded2726859c5a5239bdf217a8
MD5 7f852a6591492496ff3b60e4d7f2aff7
BLAKE2b-256 e9961a7114b50887b3f8cf39b92a234f5bccacf1a9c79aa42a9d9227c79333b2

See more details on using hashes here.

Supported by

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