> ## Documentation Index
> Fetch the complete documentation index at: https://honeydew.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Python

Honeydew can integrate with Python code, including [Jupyter](/integration/bi-tools/jupyter), using the [Trino Python client](https://pypi.org/project/trino/) package.

Here are some general guidelines for connecting python code to Honeydew JDBC interface.

<Note>
  Before you start, make sure you have the [Trino Python client](https://pypi.org/project/trino/) installed in your Jupyter environment:

  ```bash theme={null}
  pip install trino
  ```
</Note>

<Note>
  If your organization uses a custom hostname for the JDBC connection,
  you can locate it in the Honeydew UI, under the **JDBC** section in **Settings**.
</Note>

<Tip>
  It is recommended to use an [API Key](/access-control/api-keys) for setting up the connection.
</Tip>

```python theme={null}
import trino

from trino.dbapi import connect
from trino.auth import BasicAuthentication
conn = connect(
    # If your organization uses a custom hostname for the JDBC connection,
    # you can locate it in the Honeydew UI, under the JDBC section in Settings.
    host="jdbc.honeydew.cloud",
    port=443,
    http_scheme='https',

    # For credentials, pass the API key (or a Honeydew username),
    # and the API secret (or the Honeydew password)
    auth=BasicAuthentication('<api key name>', '<api key secret>'),

    # catalog is based on the Honeydew "workspace" and "branch" you would like to connect to.
    # Omit the branch value if connecting to "prod".
    # For example, for workspace "tpch", branch "prod", the value would be: "tpch".
    catalog="<workspace>__<branch>"
)

cur = conn.cursor()
cur.execute("SHOW TABLES FROM domains")
rows = cur.fetchall()
print(rows)

cur.execute('SELECT "orders.o_orderdate", AGG("lineitem.revenue") FROM domains.my_domain')
rows = cur.fetchall()
print(rows)
```
