--- id: pinotdb version: "9.1.2" license: MIT license_treatment: permissive maintenance: active --- # pinotdb — Python DB-API and SQLAlchemy dialect for Pinot. License: permissive · Maintenance: active · Popularity: top 1,000 on PyPI ## Install pip install pinotdb uv add pinotdb poetry add pinotdb ## Description # Python DB-API and SQLAlchemy dialect for Pinot This module allows accessing Pinot via its [SQL API](https://docs.pinot.apache.org/users/user-guide-query/pinot-query-language). Current supported Pinot version: `1.1.0`. ## Usage ### Using the DB API to query Pinot Broker directly: ```python from pinotdb import connect # this assumes 8000 is the broker port conn = connect(host='localhost', port=8000, path='/query/sql', scheme='http') curs = conn.cursor() curs.execute(""" SELECT place, CAST(REGEXP_EXTRACT(place, '(.*),', 1) AS FLOAT) AS lat,       CAST(REGEXP_EXTRACT(place, ',(.*)', 1) AS FLOAT) AS lon FROM places LIMIT 10 """) for row in curs: print(row) ``` For HTTPS: ```python from pinotdb import connect # this assumes that 443 is the broker secure https port conn = connect(host='localhost', port=443, path='/query/sql', scheme='https') curs = conn.cursor() curs.execute(""" SELECT place, CAST(REGEXP_EXTRACT(place, '(.*),', 1) AS FLOAT) AS lat,       CAST(REGEXP_EXTRACT(place, ',(.*)', 1) AS FLOAT) AS lon FROM places LIMIT 10 """) for row in curs: print(row) ``` Pinot also supports basic auth,... ## AI interpretation — verify before relying A Python DB-API and SQLAlchemy dialect for querying Apache Pinot via its SQL API, supporting both synchronous and asynchronous connections with optional authentication and multi-stage engine configuration. Verdict: A well-maintained, permissively licensed connector for Pinot with low install friction and no known vulnerabilities. Suitable for production use in environments with active Pinot deployments, supporting both traditional and async SQLAlchemy patterns. [View on SkillFed](https://skillfed.io/packages/pinotdb) · [View on PyPI](https://pypi.org/project/pinotdb/)