Core
Graph analytics executor and data types.
AggregationAdderByTableName
module-attribute
¤
AggregationAdderByTableName = typing.Annotated[list[tuple[str, list[str]]], {'format': 'dropdown-multidropdown_adder', 'metadata_query1': '[].dataframes[].<table_name>.columns[]', 'options2': pandas_aggregation_options}]
A type annotation to be used for parameters of an operation. AggregationAdderByTableName is rendered as a button in the frontend, that is able to add arbitrary amount of dropdown-multidropdown rows, where the dropdown lists the columns of the DataFrame named by the "table_name" parameter and the multi-dropdown contains fixed aggregation options. The values are passed to the operation as a list of tuples containing a column name and a list of selected strings.
ColumnNameByTableName
module-attribute
¤
ColumnNameByTableName = typing.Annotated[str, {'format': 'dropdown', 'metadata_query': '[].dataframes[].<table_name>.columns[]'}]
A type annotation to be used for parameters of an operation. ColumnNameByTableName is rendered as a dropdown in the frontend, listing the columns of the DataFrame named by the "table_name" parameter. The column name is passed to the operation as a string.
DoubleTextAdder
module-attribute
¤
DoubleTextAdder = typing.Annotated[list[tuple[str, str]], {'format': 'double-textbox_adder', 'metadata_query1': '[].dataframes[].<table_name>.columns[]'}]
A type annotation to be used for parameters of an operation. DoubleTextAdder is rendered as a button in the frontend, that is able to add arbitrary amount of textbox-textbox pairs. The inputs are passed to the operation as a list of string 2-tuples.
DropdownTextAdderByTableName
module-attribute
¤
DropdownTextAdderByTableName = typing.Annotated[list[tuple[str, str]], {'format': 'dropdown-textbox_adder', 'metadata_query1': '[].dataframes[].<table_name>.columns[]'}]
A type annotation to be used for parameters of an operation. DropdownTextAdderByTableName is rendered as a button in the frontend, that is able to add arbitrary amount of dropdown-textbox pairs, where the dropdown lists the columns of the DataFrame named by the "table_name" parameter. The column names are passed to the operation as a list of string 2-tuples.
EdgePropertyName
module-attribute
¤
EdgePropertyName = typing.Annotated[str, {'format': 'dropdown', 'metadata_query': '[].dataframes[].edges[].columns[]'}]
A type annotation to be used for parameters of an operation. EdgePropertyName is rendered as a dropdown in the frontend, listing the columns of the "edges" DataFrame. The column name is passed to the operation as a string.
MultiColumnNameByTableName
module-attribute
¤
MultiColumnNameByTableName = typing.Annotated[list[str], {'format': 'multi-dropdown', 'metadata_query': '[].dataframes[].<table_name>.columns[]'}]
A type annotation to be used for parameters of an operation. MultiColumnNameByTableName is rendered as a multiple-choice dropdown in the frontend, listing the columns of the DataFrame named by the "table_name" parameter. The column names are passed to the operation as a list of strings.
MultiTableName
module-attribute
¤
MultiTableName = typing.Annotated[list[str], {'format': 'multi-dropdown', 'metadata_query': '[].dataframes[].keys(@)[]'}]
A type annotation to be used for parameters of an operation. MultiTableName is rendered as a multiple-choice dropdown in the frontend, listing the tables of the DataFrame. The table names are passed to the operation as a list of strings.
NodePropertyName
module-attribute
¤
NodePropertyName = typing.Annotated[str, {'format': 'dropdown', 'metadata_query': '[].dataframes[].nodes[].columns[]'}]
A type annotation to be used for parameters of an operation. NodePropertyName is rendered as a dropdown in the frontend, listing the columns of the "nodes" DataFrame. The column name is passed to the operation as a string.
OtherName
module-attribute
¤
A type annotation to be used for parameters of an operation. OtherName is rendered as a dropdown in the frontend, listing the keys on the "other" part of the Bundle. The key is passed to the operation as a string.
RecordsColumn
module-attribute
¤
RecordsColumn = typing.Annotated[str, {'format': 'dropdown', 'metadata_query': '[].dataframes[].records.columns[]'}]
A type annotation to be used for parameters of an operation. RecordsColumn is rendered as a dropdown in the frontend, listing the columns of the "records" DataFrame. The column name is passed to the operation as a string.
RelationName
module-attribute
¤
RelationName = typing.Annotated[str, {'format': 'dropdown', 'metadata_query': '[].relations[].name'}]
A type annotation to be used for parameters of an operation. RelationDropdown is rendered as a dropdown that lists the names of available relations.
TableColumn
module-attribute
¤
TableColumn = typing.Annotated[tuple[str, str], {'format': 'double-dropdown', 'metadata_query1': '[].dataframes[].keys(@)[]', 'metadata_query2': '[].dataframes[].<first>.columns[]'}]
A type annotation to be used for parameters of an operation. TableColumn is rendered as a pair of dropdowns for selecting a table in the Bundle and a column inside of that table. Effectively "TableName" and "ColumnNameByTableName" combined. The selected table and column name is passed to the operation as a 2-tuple of strings.
TableName
module-attribute
¤
TableName = typing.Annotated[str, {'format': 'dropdown', 'metadata_query': '[].dataframes[].keys(@)[]'}]
A type annotation to be used for parameters of an operation. TableName is rendered as a dropdown in the frontend, listing all DataFrames in the Bundle. The table name is passed to the operation as a string.
RedirectToCurrentUrlService
¤
Service
¤
api_service_get
async
¤
Boxes can expose HTTP endpoints.
Example
... class ChatBackend: def get(self, request: fastapi.Request): return f"Hello from {request.state.remaining_path}" def post(self, request: fastapi.Request): print("POST received for", request.state.remaining_path) @op("Chat backend", outputs=[], view="service") def chat_backend(input: Bundle): return ChatBackend()
curl ${LYNXKITE_URL}/api/service/lynxkite_graph_analytics/Example.lynxkite.json/Chat%20backend%201/models
disambiguate_edges
¤
disambiguate_edges(ws: Workspace)
If an input plug is connected to multiple edges, keep only the last edge.
nx_node_attribute_func
¤
Decorator for wrapping a function that adds a NetworkX node attribute.