FalkorDBGraph#

class langchain_community.graphs.falkordb_graph.FalkorDBGraph(database: str, host: str = 'localhost', port: int = 6379, username: str | None = None, password: str | None = None, ssl: bool = False)[source]#

FalkorDB wrapper for graph operations.

Security note: Make sure that the database connection uses credentials

that are narrowly-scoped to only include necessary permissions. Failure to do so may result in data corruption or loss, since the calling code may attempt commands that would result in deletion, mutation of data if appropriately prompted or reading sensitive data if such data is present in the database. The best way to guard against such negative outcomes is to (as appropriate) limit the permissions granted to the credentials used with this tool.

See https://python.langchain.com/docs/security for more information.

Create a new FalkorDB graph wrapper instance.

Attributes

get_schema

Returns the schema of the FalkorDB database

get_structured_schema

Returns the structured schema of the Graph

Methods

__init__(database[,Β host,Β port,Β username,Β ...])

Create a new FalkorDB graph wrapper instance.

add_graph_documents(graph_documents[,Β ...])

Take GraphDocument as input as uses it to construct a graph.

query(query[,Β params])

Query FalkorDB database.

refresh_schema()

Refreshes the schema of the FalkorDB database

Parameters:
  • database (str) –

  • host (str) –

  • port (int) –

  • username (str | None) –

  • password (str | None) –

  • ssl (bool) –

__init__(database: str, host: str = 'localhost', port: int = 6379, username: str | None = None, password: str | None = None, ssl: bool = False) β†’ None[source]#

Create a new FalkorDB graph wrapper instance.

Parameters:
  • database (str) –

  • host (str) –

  • port (int) –

  • username (str | None) –

  • password (str | None) –

  • ssl (bool) –

Return type:

None

add_graph_documents(graph_documents: List[GraphDocument], include_source: bool = False) β†’ None[source]#

Take GraphDocument as input as uses it to construct a graph.

Parameters:
  • graph_documents (List[GraphDocument]) –

  • include_source (bool) –

Return type:

None

query(query: str, params: dict = {}) β†’ List[Dict[str, Any]][source]#

Query FalkorDB database.

Parameters:
  • query (str) –

  • params (dict) –

Return type:

List[Dict[str, Any]]

refresh_schema() β†’ None[source]#

Refreshes the schema of the FalkorDB database

Return type:

None

Examples using FalkorDBGraph