prefect_sqlalchemy.credentials
Credential classes used to perform authenticated interactions with SQLAlchemy
AsyncDriver
Bases: Enum
Known dialects with their corresponding async drivers.
Attributes:
Name | Type | Description |
---|---|---|
POSTGRESQL_ASYNCPG |
Enum
|
|
SQLITE_AIOSQLITE |
Enum
|
|
MYSQL_ASYNCMY |
Enum
|
|
MYSQL_AIOMYSQL |
Enum
|
|
ORACLE_ORACLEDB_ASYNC |
Enum
|
Source code in prefect_sqlalchemy/credentials.py
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
|
ConnectionComponents
Bases: BaseModel
Parameters to use to create a SQLAlchemy engine URL.
Attributes:
Name | Type | Description |
---|---|---|
driver |
Union[AsyncDriver, SyncDriver, str]
|
The driver name to use. |
database |
str
|
The name of the database to use. |
username |
Optional[str]
|
The user name used to authenticate. |
password |
Optional[SecretStr]
|
The password used to authenticate. |
host |
Optional[str]
|
The host address of the database. |
port |
Optional[int]
|
The port to connect to the database. |
query |
Optional[Dict[str, str]]
|
A dictionary of string keys to string values to be passed to the dialect and/or the DBAPI upon connect. |
Source code in prefect_sqlalchemy/credentials.py
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 |
|
create_url()
Create a fully formed connection URL.
Returns:
Type | Description |
---|---|
URL
|
The SQLAlchemy engine URL. |
Source code in prefect_sqlalchemy/credentials.py
128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 |
|
SyncDriver
Bases: Enum
Known dialects with their corresponding sync drivers.
Attributes:
Name | Type | Description |
---|---|---|
POSTGRESQL_PSYCOPG2 |
Enum
|
|
POSTGRESQL_PG8000 |
Enum
|
|
POSTGRESQL_PSYCOPG2CFFI |
Enum
|
|
POSTGRESQL_PYPOSTGRESQL |
Enum
|
|
POSTGRESQL_PYGRESQL |
Enum
|
|
MYSQL_MYSQLDB |
Enum
|
|
MYSQL_PYMYSQL |
Enum
|
|
MYSQL_MYSQLCONNECTOR |
Enum
|
|
MYSQL_CYMYSQL |
Enum
|
|
MYSQL_OURSQL |
Enum
|
|
MYSQL_PYODBC |
Enum
|
|
SQLITE_PYSQLITE |
Enum
|
|
SQLITE_PYSQLCIPHER |
Enum
|
|
ORACLE_CX_ORACLE |
Enum
|
|
ORACLE_ORACLEDB |
Enum
|
|
MSSQL_PYODBC |
Enum
|
|
MSSQL_MXODBC |
Enum
|
|
MSSQL_PYMSSQL |
Enum
|
Source code in prefect_sqlalchemy/credentials.py
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 |
|