{"id":23432,"library":"clickzetta-connector-python","title":"ClickZetta Python Connector","description":"Official Python connector for ClickZetta cloud database. Version 0.8.109. Provides a DB-API 2.0 interface for querying and managing ClickZetta clusters. Regular releases.","status":"active","version":"0.8.109","language":"python","source_language":"en","source_url":"https://github.com/ClickZetta/clickzetta-connector-python","tags":["clickzetta","database","connector","web-socket"],"install":[{"cmd":"pip install clickzetta-connector-python","lang":"bash","label":"PyPI"}],"dependencies":[{"reason":"HTTP requests to ClickZetta API","package":"requests","optional":false},{"reason":"Optional: for DataFrame conversion","package":"pandas","optional":true}],"imports":[{"note":"Direct import of clickzetta package is correct; don't use underscore variant.","wrong":"from clickzetta_connector import clickzetta","symbol":"clickzetta","correct":"import clickzetta"},{"note":"connect function is in the top-level clickzetta module.","wrong":"from clickzetta_connector import connect","symbol":"connect","correct":"from clickzetta import connect"}],"quickstart":{"code":"import clickzetta\nconn = clickzetta.connect(\n    url=os.environ.get('CLICKZETTA_URL', 'ws://localhost:8080/ws'),\n    user=os.environ.get('CLICKZETTA_USER', 'default'),\n    password=os.environ.get('CLICKZETTA_PASSWORD', ''),\n    database='default'\n)\ncursor = conn.cursor()\ncursor.execute('SELECT version()')\nprint(cursor.fetchone())\ncursor.close()\nconn.close()","lang":"python","description":"Establishes a WebSocket connection to ClickZetta, executes a query, and prints the result."},"warnings":[{"fix":"Update the URL to use '/ws' (default: ws://host:port/ws).","message":"In version 0.8.x, the WebSocket endpoint changed from '/sql' to '/ws'. Old clients using '/sql' will get connection errors.","severity":"breaking","affected_versions":">=0.7, <0.8.0"},{"fix":"Use conn.set_schema('schema_name') or include schema in SQL.","message":"The 'database' parameter in connect() is deprecated; use 'schema' instead.","severity":"deprecated","affected_versions":">=0.8.0"},{"fix":"Use ws:// or wss:// URL and verify network connectivity.","message":"The connector uses WebSocket, not HTTP. Ensure your firewall allows WebSocket traffic on the configured port.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Double-check credentials; ensure user exists and password is correct. Use environment variables.","cause":"Invalid username or password provided in connect().","error":"clickzetta.exceptions.ClickZettaError: 401 Unauthorized"},{"fix":"Check firewall rules and ensure ClickZetta server allows WebSocket connections from your IP.","cause":"Server IP is not allowed or WebSocket subprotocol mismatch.","error":"websockets.exceptions.InvalidHandshake: Status 403"},{"fix":"Use 'import clickzetta' or 'from clickzetta import connect'.","cause":"Importing from 'clickzetta_connector' instead of 'clickzetta'.","error":"AttributeError: module 'clickzetta' has no attribute 'connect'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}