一、产品介绍
1、官方 Github
https://github.com/PrefectHQ/prefect
2、官方文档
https://docs.prefect.io/3.0/get-started/index
3、Pgsql说明
正确的python链接pgsql如下:
import psycopg2
from sqlalchemy import create_engine
def connect_with_psycopg2():
try:
conn = psycopg2.connect(
dbname="prefect",
user="prefect_user",
password="123456-AbCd",
host="127.0.0.1",
port="5432"
)
print("Connection successful with psycopg2!")
except Exception as e:
print(f"Connection failed with psycopg2: {
e}")
finally:
if conn:
conn.close()
def connect_with_sqlalchemy():
try:
engine = create_engine("postgresql://prefect_user:123456-AbCd@127.0.0.1:5432/prefect")
with engine