MCPcopy Create free account
hub / github.com/Pometry/Raphtory / template_from_python

Function template_from_python

raphtory-graphql/src/python/server/server.rs:79–93  ·  view source on GitHub ↗
(
    nodes: TemplateConfig,
    edges: TemplateConfig,
)

Source from the content-addressed store, hash-verified

77}
78
79fn template_from_python(
80 nodes: TemplateConfig,
81 edges: TemplateConfig,
82) -> PyResult<DocumentTemplate> {
83 if nodes.is_disabled() && edges.is_disabled() {
84 Err(PyAttributeError::new_err(
85 "at least one of nodes and edges has to be set to True or some string",
86 ))
87 } else {
88 Ok(DocumentTemplate {
89 node_template: nodes.get_template_or(DEFAULT_NODE_TEMPLATE),
90 edge_template: edges.get_template_or(DEFAULT_EDGE_TEMPLATE),
91 })
92 }
93}
94
95#[pymethods]
96impl PyGraphServer {

Callers 2

vectorise_graphMethod · 0.85
vectorise_all_graphsMethod · 0.85

Calls 3

ErrEnum · 0.85
is_disabledMethod · 0.80
get_template_orMethod · 0.80

Tested by

no test coverage detected