DbmsConnectionInfo

class graphdatascience.session.dbms_connection_info.DbmsConnectionInfo

表示 Neo4j DBMS(例如 AuraDB 实例)的连接信息。支持用户名/密码以及 Neo4j Python 驱动提供的身份验证选项。

__init__(uri: str | None = None, username: str | None = None, password: str | None = None, database: str | None = None, auth: Auth | None = None, aura_instance_id: str | None = None, aura_database_id: str | None = None) None
参数:
  • uri (str | None)

  • username (str | None)

  • password (str | None)

  • database (str | None)

  • auth (Auth | None)

  • aura_instance_id (str | None)

  • aura_database_id (str | None)

返回类型:

None

static from_env() DbmsConnectionInfo

从环境变量创建一个 DbmsConnectionInfo 实例。环境变量包括:- NEO4J_URI - NEO4J_USERNAME - NEO4J_PASSWORD - NEO4J_DATABASE - AURA_INSTANCEID

返回类型:

DbmsConnectionInfo

get_auth() Auth | None
返回:

用于身份验证的 neo4j.Auth 对象。

返回类型:

Auth | None

© . This site is unofficial and not affiliated with Neo4j, Inc.