Back to Prefect

credentials

docs/integrations/prefect-sqlalchemy/api-ref/prefect_sqlalchemy-credentials.mdx

3.6.30.dev35.0 KB
Original Source

prefect_sqlalchemy.credentials

Credential classes used to perform authenticated interactions with SQLAlchemy

Classes

AsyncDriver <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/integrations/prefect-sqlalchemy/prefect_sqlalchemy/credentials.py#L10" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

Known dialects with their corresponding async drivers.

Attributes:

SyncDriver <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/integrations/prefect-sqlalchemy/prefect_sqlalchemy/credentials.py#L35" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

Known dialects with their corresponding sync drivers.

Attributes:

ConnectionComponents <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/integrations/prefect-sqlalchemy/prefect_sqlalchemy/credentials.py#L88" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

Parameters to use to create a SQLAlchemy engine URL.

Attributes:

  • driver: The driver name to use.
  • database: The name of the database to use.
  • username: The user name used to authenticate.
  • password: The password used to authenticate.
  • host: The host address of the database.
  • port: The port to connect to the database.
  • query: A dictionary of string keys to string values to be passed to the dialect and/or the DBAPI upon connect.

Methods:

create_url <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/integrations/prefect-sqlalchemy/prefect_sqlalchemy/credentials.py#L130" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

python
create_url(self) -> URL

Create a fully formed connection URL.

Returns:

  • The SQLAlchemy engine URL.