Skip to content

Documentation for trino.dbapi.connect parameters #583

Open

Description

@dprophet

The trino.dbapi.connect has no documentation on the connection parameters.

I recommend adding a table like the below for said parameters.

Parameter Type Default Description
host str 'localhost' The hostname or IP address of the Trino coordinator.
port int 8080 The port number of the Trino coordinator.
user str None The username for the session. Required if not using an auth method that supplies it.
catalog str None The default catalog to use for queries.
schema str None The default schema to use for queries.
auth object None An authentication instance (e.g., BasicAuthentication, KerberosAuthentication).
http_scheme str 'http' Protocol to use: 'http' or 'https'.
verify bool | str True Controls SSL verification. Set to False to disable, or provide a path to a CA bundle.
max_attempts int 3 Maximum number of retry attempts for HTTP requests.
request_timeout float None Client-side timeout (in seconds) for the HTTP request itself.
source str 'trino-python-client' The source name displayed in the Trino Web UI for queries.
session_properties dict None A dictionary of session properties (e.g., {'query_max_run_time': '10m'}).
http_headers dict None A dictionary of additional custom HTTP headers to send with requests.
client_tags list[str] None A list of tags to associate with the session/queries.
isolation_level int AUTOCOMMIT Transaction isolation level.
timezone str None The timezone for the session (e.g., 'US/Pacific').

Activity

  1. mosabua commented on Nov 25, 2025

    @mosabua
    Member

    That sounds good.. what would be the best way to do that so that it is available to Python developers as well as here on the repo somehow @hashhar ?

  2. ParthKolekar commented on Apr 13, 2026

    @ParthKolekar

    Can we add this to the docstring of the Connection class?

    Additionally, as a suggestion, it would be nice to document what a None means in the context of the parameter's usage....

    eg: What is a "None" timezone, is it US/Pacific by default? This seems to be used only in the time_str, but I just did a surface level scan around this.

  3. ParthKolekar commented on Apr 13, 2026

    @ParthKolekar

    Happy to do this change myself, so do let me know if the approach seems good to you.

    @mosabua / @hashhar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions