Client
Methods
Methods available directly on the PerseusClient instance.
Build Graph
Builds a graph from a file, optionally using a specific ontology, and waits for the job to complete. This method encapsulates the file upload, job submission, and job completion polling.
async def build_graph_async(
file_path: str,
ontology_path: Optional[str] = None,
output_path: Optional[str] = None,
save_to_neo4j: bool = False,
refresh_graph: bool = False,
) -> Jobdef build_graph(
file_path: str,
ontology_path: Optional[str] = None,
output_path: Optional[str] = None,
save_to_neo4j: bool = False,
refresh_graph: bool = False,
) -> JobParameters:
file_path(str): The path to the file to process.ontology_path(Optional[str]): The path to the ontology file to use.output_path(Optional[str]): The path to save the output to. If not provided, a default path will be used.save_to_neo4j(bool): Whether to save the output to Neo4j.refresh_graph(bool): Whether to force a new job to be created (refresh the graph).
Output:
The completed Job object, with its status updated to SUCCEEDED or FAILED.