{"id":27274,"library":"pydoris-custom","title":"pydoris (Custom Build - Relaxed Dependencies)","description":"A custom build of the Python client for Apache Doris (version 1.1.0 on PyPI), based on the official pydoris library but with relaxed dependency constraints. This client provides a DB-API 2.0 interface to connect to Doris clusters, execute SQL queries (primarily using the MySQL protocol), and manage connections. It is intended for users who need a more permissive dependency tree than the original pydoris, but may lag behind official updates.","status":"active","version":"1.1.0","language":"python","source_language":"en","source_url":"https://github.com/apache/doris","tags":["doris","pydoris","mysql","analytics","database","apache-doris","python-client"],"install":[{"cmd":"pip install pydoris-custom","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Base library; pydoris-custom is a fork/modification of pydoris.","package":"pydoris","optional":false},{"reason":"Commonly used for MySQL protocol communication with Doris.","package":"mysql-connector-python","optional":true}],"imports":[{"note":"The main entry point for creating a connection to Doris.","symbol":"connect","correct":"from pydoris import connect"}],"quickstart":{"code":"from pydoris import connect\n\nconn = connect(\n    host='127.0.0.1',\n    port=9030,\n    user='admin',\n    password='',\n    database='example_db'\n)\ncursor = conn.cursor()\ncursor.execute(\"SHOW TABLES\")\nfor row in cursor.fetchall():\n    print(row)\ncursor.close()\nconn.close()","lang":"python","description":"Quickstart to connect to a local Doris instance, list tables in the default database."},"warnings":[{"fix":"Use only pydoris-custom or official pydoris in a virtual environment; do not install both.","message":"pydoris-custom has relaxed dependency pins (e.g., protobuf, grpcio) and may be incompatible with the official pydoris library's strict version requirements. Mixing both in the same environment can cause version conflicts and import errors.","severity":"breaking","affected_versions":"all"},{"fix":"Ensure you connect with the proper port and protocol. For MySQL: port=9030. For HTTP: protocol='https' and port=8030.","message":"The library primarily uses the MySQL protocol for communication, but also supports HTTP. Importing from 'pydoris' does not automatically configure the protocol. You must specify the correct port (MySQL default 9030) and optionally pass 'protocol='https'' for HTTP.","severity":"gotcha","affected_versions":"all"},{"fix":"Replace 'Client' with 'connect' and use the standard cursor interface.","message":"Use of 'from pydoris import Client' is deprecated and may be removed. The recommended approach is to use the 'connect' function which returns a DB-API 2.0 connection object.","severity":"deprecated","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Install the correct package: pip install pydoris-custom, and keep import from pydoris.","cause":"The package 'pydoris-custom' is installed but the import statement uses 'pydoris'. The package exposes the same module name as the official pydoris.","error":"ModuleNotFoundError: No module named 'pydoris'"},{"fix":"Ensure the protocol matches the server configuration. For HTTP, pass protocol='https'. For MySQL, ensure port is 9030 and no protocol argument is needed (defaults to mysql).","cause":"The client attempted to connect using the default MySQL protocol, but the Doris server expects HTTP, or vice versa.","error":"doris_protocol.ProtocolError: Protocol not supported (mysql)"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}