Kinetica GPUDB Python Client

raw JSON →
7.2.3.8 verified Sat May 09 auth: no python

Official Python client for Kinetica (formerly GPUdb), a GPU-accelerated database. Current version 7.2.3.8, requires Python >=3.8.

pip install gpudb
error AttributeError: module 'gpudb' has no attribute 'GPUdb'
cause Trying to use `import gpudb` then `gpudb.GPUdb()`, but the class is not imported that way.
fix
Use from gpudb import GPUdb.
error TypeError: __init__() got multiple values for argument 'host'
cause Passing both positional and keyword arguments for host (v7.2+ signature change).
fix
Use GPUdb(host='...') or GPUdb(GPUdb.Options()).
error gpudb.exception.GPUdbException: Error in /show/status: [500] Internal Server Error
cause Credentials not provided or incorrect, or server not accessible.
fix
Check KINETICA_HOST, KINETICA_USERNAME, KINETICA_PASSWORD environment variables, or provide them in Options.
breaking v7.2.0+ changed the constructor signature. `GPUdb(host, port)` no longer works; use `GPUdb(options)` or `GPUdb(host=..., port=...)`.
fix Use `GPUdb.Options()` or pass keyword arguments: `GPUdb(host='...', port=...)`.
deprecated Direct import of `gpudb` (without submodule) is deprecated; always use `from gpudb import GPUdb`.
fix Change `import gpudb` to `from gpudb import GPUdb`.
gotcha Default authentication uses empty credentials. If the server requires auth, you must set username and password, or the connection will fail with 'SQLSTATE[08001]'.
fix Set `options.username` and `options.password` before creating the GPUdb object.

Connect to Kinetica using environment variables.

from gpudb import GPUdb

options = GPUdb.Options()
options.host = os.environ.get('KINETICA_HOST', 'http://localhost:9191')
options.username = os.environ.get('KINETICA_USERNAME', '')
options.password = os.environ.get('KINETICA_PASSWORD', '')

db = GPUdb(options)
print(db.show_system_status())