ultipa.operate package

Submodules

ultipa.operate.algo_extra module

class ultipa.operate.algo_extra.AlgoExtra(host: str, defaultConfig: UltipaConfig, crtFilePath: str | None = None)[source]

Bases: BaseExtra

Processing class that defines settings for algorithm related operations.

JSONSTRING_KEYS = ['param']
installAlgo(algoFilePath: str, algoInfoFilePath: str, requestConfig: ~ultipa.configuration.RequestConfig.RequestConfig = <ultipa.configuration.RequestConfig.RequestConfig object>) Response[source]

Install an Ultipa standard algorithm.

Args:

algoFilePath: The directory of the algorithm package (.so)

algoInfoFilePath: The directory of the algorithm configuration (.yml)

requestConfig: An object of the RequestConfig class

Returns:

Response

installExtaAlgo(algoFilePath: str, algoInfoFilePath: str, requestConfig: ~ultipa.configuration.RequestConfig.RequestConfig = <ultipa.configuration.RequestConfig.RequestConfig object>) Response[source]

Install an EXTA algorithm (via gRPC port).

Args:

algoFilePath: The directory of the algorithm package (.so)

algoInfoFilePath: The directory of the algorithm configuration (.yml)

requestConfig: An object of the RequestConfig class

Returns:

Response

showAlgo(requestConfig: ~ultipa.configuration.RequestConfig.RequestConfig = <ultipa.configuration.RequestConfig.RequestConfig object>) ResponseListAlgo[source]

Query for algorithm list.

Args:

requestConfig: An object of the RequestConfig class

Returns:

ResponseListAlgo

uninstallAlgo(algoName: str, requestConfig: ~ultipa.configuration.RequestConfig.RequestConfig = <ultipa.configuration.RequestConfig.RequestConfig object>) Response[source]

Uninstall an Ultipa standard algorithm.

Args:

algoName: The name of algorithm

requestConfig: An object of the RequestConfig class

Returns:

Response

uninstallExtaAlgo(algoName: str, requestConfig: ~ultipa.configuration.RequestConfig.RequestConfig = <ultipa.configuration.RequestConfig.RequestConfig object>) Response[source]

Uninstall an EXTA (via gRPC port).

Args:

algoName: The name of algorithm

requestConfig: An object of the RequestConfig class

Returns:

Response

ultipa.operate.base_extra module

class ultipa.operate.base_extra.BaseExtra(host: str, defaultConfig: UltipaConfig, crtFilePath: str | None = None)[source]

Bases: ConnectionBase

Processing class that defines settings for basic operations.

UqlListSimple(uqlMaker: UQLMAKER, responseKeyFormat: ResponseKeyFormat | None = None, isSingleOne: bool = True) UltipaResponse[source]
UqlUpdateSimple(uqlMaker: UQLMAKER)[source]
exportData(request: ~ultipa.types.types_request.Export, requestConfig: ~ultipa.configuration.RequestConfig.RequestConfig = <ultipa.configuration.RequestConfig.RequestConfig object>)[source]
insertEdgesBatchAuto(edges: List[EntityRow], config: InsertConfig) ResponseBatchAutoInsert[source]

Batch insert edges of different schemas (that will be created if not existent)

Args:

edges: The data rows to be inserted, List[ULTIPA.EntityRow]

config: An object of InsertConfig class

Returns:

ResponseBatchAutoInsert

insertEdgesBatchBySchema(schema: Schema, rows: List[EntityRow], config: InsertConfig) InsertResponse[source]

Batch insert edges of a same schema (that already exists in the graphset)

Args:

schema: Schema 实例化Schema对象

rows: The data rows to be inserted, List[ULTIPA.EntityRow]

config: An object of InsertConfig class

Returns:

InsertResponse

insertNodesBatchAuto(nodes: List[EntityRow], config: InsertConfig) ResponseBatchAutoInsert[source]

Batch insert nodes of different schemas (that will be created if not existent)

Args:

nodes: The data rows to be inserted, List[ULTIPA.EntityRow]

config: An object of InsertConfig class

Returns:

ResponseBatchAutoInsert

insertNodesBatchBySchema(schema: Schema, rows: List[EntityRow], config: InsertConfig) InsertResponse[source]

Batch insert nodes of a same schema (that already exists in the graphset).

Args:

schema: An object of Schema class

rows: The data rows to be inserted, List[ULTIPA.EntityRow]

config: An object of InsertConfig class

Returns:

InsertResponse

stats(requestConfig: ~ultipa.configuration.RequestConfig.RequestConfig = <ultipa.configuration.RequestConfig.RequestConfig object>) ResponseStat[source]

Query for the server statistics.

Args:

requestConfig: An object of RequestConfig class

Returns:

ResponseStat

test(requestConfig: ~ultipa.configuration.RequestConfig.RequestConfig = <ultipa.configuration.RequestConfig.RequestConfig object>) Response[source]

Test connection.

Args:

requestConfig: An object of RequestConfig class

Returns:

Response

uql(uql: str, requestConfig: ~ultipa.configuration.RequestConfig.RequestConfig = <ultipa.configuration.RequestConfig.RequestConfig object>) UltipaResponse[source]

Execute UQL.

Args:

uql: A uql statement

requestConfig: An object of RequestConfig class

Returns:

UltipaResponse

uqlSingle(uqlMaker: UQLMAKER) UltipaResponse[source]

ultipa.operate.download_extra module

class ultipa.operate.download_extra.DownloadExtra(host: str, defaultConfig: UltipaConfig, crtFilePath: str | None = None)[source]

Bases: BaseExtra

Processing class that defines settings for file downloading operation.

download(request: ~ultipa.types.types_request.Download, requestConfig: ~ultipa.configuration.RequestConfig.RequestConfig = <ultipa.configuration.RequestConfig.RequestConfig object>) List[Response][source]

Download files.

Args:

request: An object of Download class

requestConfig: An object of RequestConfig class

with open(‘./XXXXX.csv’, ‘ab+’) as f:
for data_flow in ret:

data = data_flow.chunk f.write(data)

Returns:

stream

ultipa.operate.edge_extra module

class ultipa.operate.edge_extra.EdgeExtra(host: str, defaultConfig: UltipaConfig, crtFilePath: str | None = None)[source]

Bases: BaseExtra

Processing class that defines settings for edge related operations.

deleteEdge(request: ~ultipa.types.types_request.DeleteEdge, requestConfig: ~ultipa.configuration.RequestConfig.RequestConfig = <ultipa.configuration.RequestConfig.RequestConfig object>) UltipaResponse[source]

Delete edges.

Args:

request: An object of DeleteEdge class

requestConfig: An object of RequestConfig class

Returns:

UltipaResponse

insertEdge(request: ~ultipa.types.types_request.InsertEdge, requestConfig: ~ultipa.configuration.RequestConfig.RequestConfig = <ultipa.configuration.RequestConfig.RequestConfig object>) ResponseInsert[source]

Insert edges.

Args:

request: An object of InsertEdge class

requestConfig: An object of RequestConfig class

Returns:

ResponseInsert

searchEdge(request: ~ultipa.types.types_request.SearchEdge, requestConfig: ~ultipa.configuration.RequestConfig.RequestConfig = <ultipa.configuration.RequestConfig.RequestConfig object>) ResponseSearchEdge[source]

Query for edges.

Args:

request: An object of SearchEdge class

requestConfig: An object of RequestConfig class

Returns:

ResponseSearchEdge

updateEdge(request: ~ultipa.types.types_request.UpdateEdge, requestConfig: ~ultipa.configuration.RequestConfig.RequestConfig = <ultipa.configuration.RequestConfig.RequestConfig object>) UltipaResponse[source]

Update edges.

Args:

request: An object of UpdateEdge class

requestConfig: An object of RequestConfig class

Returns:

UltipaResponse

ultipa.operate.export_extra module

class ultipa.operate.export_extra.ExportExtra(host: str, defaultConfig: UltipaConfig, crtFilePath: str | None = None)[source]

Bases: BaseExtra

Processing class that defines settings for data exporting operation.

export(request: ~ultipa.types.types_request.Export, requestConfig: ~ultipa.configuration.RequestConfig.RequestConfig = <ultipa.configuration.RequestConfig.RequestConfig object>) ResponseExport[source]

Export data.

Args:

request: An object of Export class

requestConfig: An object of RequestConfig class

Returns:

ResponseExport

ultipa.operate.graph_extra module

class ultipa.operate.graph_extra.GraphExtra(host: str, defaultConfig: UltipaConfig, crtFilePath: str | None = None)[source]

Bases: BaseExtra

Processing class that defines settings for graphset related operations.

alterGraph(oldGraphName: str, newGraphName: str, newDescription: str | None = None, requestConfig: ~ultipa.configuration.RequestConfig.RequestConfig = <ultipa.configuration.RequestConfig.RequestConfig object>) UltipaResponse[source]

Alter a graphset

Args:

oldGraphName: The orignal name of graphset

newGraphName: The new name of graphset

newDescription: The new description of graphset

requestConfig: An object of RequestConfig class

Returns:

UltipaResponse

createGraph(graph: ~ultipa.structs.Graph.Graph, requestConfig: ~ultipa.configuration.RequestConfig.RequestConfig = <ultipa.configuration.RequestConfig.RequestConfig object>) UltipaResponse[source]

Create a graphset.

Args:

grpah: An object of Graph class

requestConfig: An object of RequestConfig class

Returns:

UltipaResponse

dropGraph(graphName: str, requestConfig: ~ultipa.configuration.RequestConfig.RequestConfig = <ultipa.configuration.RequestConfig.RequestConfig object>) UltipaResponse[source]

Drop a graphset.

Args:

graphName: The name of graphset

requestConfig: An object of RequestConfig class

Returns:

UltipaResponse

getGraph(graphName: str, requestConfig: ~ultipa.configuration.RequestConfig.RequestConfig = <ultipa.configuration.RequestConfig.RequestConfig object>) ResponseGraph[source]

Acquire a designated graphset.

Args:

graphName: The name of graphset

requestConfig: An object of RequestConfig class

Returns:

UltipaResponse

listGraph(requestConfig: ~ultipa.configuration.RequestConfig.RequestConfig = <ultipa.configuration.RequestConfig.RequestConfig object>) ResponseListGraph[source]

Acquire graphset list (for internal use).

Args:

requestConfig: An object of RequestConfig class

Returns:

ResponseListGraph

showGraph(requestConfig: ~ultipa.configuration.RequestConfig.RequestConfig = <ultipa.configuration.RequestConfig.RequestConfig object>) ResponseListGraph[source]

Acquire graphset list.

Args:

requestConfig: An object of RequestConfig class

Returns:

ResponseListGraph

uqlCreateSubgraph(uql: str, subGraphName: str, requestConfig: ~ultipa.configuration.RequestConfig.RequestConfig = <ultipa.configuration.RequestConfig.RequestConfig object>)[source]

ultipa.operate.index_extra module

class ultipa.operate.index_extra.IndexExtra(host: str, defaultConfig: UltipaConfig, crtFilePath: str | None = None)[source]

Bases: BaseExtra

Processing class that defines settings for index related operations.

createFulltext(request: ~ultipa.types.types_request.CreateFulltext, rquestConfig: ~ultipa.configuration.RequestConfig.RequestConfig = <ultipa.configuration.RequestConfig.RequestConfig object>) UltipaResponse[source]

Create a full-text index.

Args:

request: An object of CreateFulltext class

rquestConfig: An object of RequestConfig class

Returns:

UltipaResponse

createIndex(request: ~ultipa.types.types_request.CreateIndex, requestConfig: ~ultipa.configuration.RequestConfig.RequestConfig = <ultipa.configuration.RequestConfig.RequestConfig object>) UltipaResponse[source]

Create an index.

Args:

request: An object of CreateIndex class

requestConfig: An object of RequestConfig class

Returns:

UltipaResponse

dropFulltext(request: ~ultipa.types.types_request.DropFulltext, requestConfig: ~ultipa.configuration.RequestConfig.RequestConfig = <ultipa.configuration.RequestConfig.RequestConfig object>) UltipaResponse[source]

Drop a full-text index.

Args:

request: An object of DropFulltext class

requestConfig: An object of RequestConfig class

Returns:

UltipaResponse

dropIndex(request: ~ultipa.types.types_request.DropIndex, requestConfig: ~ultipa.configuration.RequestConfig.RequestConfig = <ultipa.configuration.RequestConfig.RequestConfig object>) UltipaResponse[source]

Drop an index.

Args:

request: An object of DropIndex class

requestConfig: An object of RequestConfig class

Returns:

UltipaResponse

showFulltext(dbType: ~ultipa.structs.DBType.DBType | None = None, requestConfig: ~ultipa.configuration.RequestConfig.RequestConfig = <ultipa.configuration.RequestConfig.RequestConfig object>) ResponseListFulltextIndex[source]

Show all full-text indice.

Args:

dbType: The DBType of data (DBNODE or DBEDGE), show both types of full-text indice by default

requestConfig: An object of RequestConfig class

Returns:

ResponseListFulltextIndex

showIndex(dbType: ~ultipa.structs.DBType.DBType | None = None, requestConfig: ~ultipa.configuration.RequestConfig.RequestConfig = <ultipa.configuration.RequestConfig.RequestConfig object>) ResponseListIndex[source]

Show all indice.

Args:

dbType: The DBType of data (DBNODE or DBEDGE), show both types of indice by default

requestConfig: An object of RequestConfig class

Returns:

ResponseListIndex

ultipa.operate.lte_ufe_extra module

class ultipa.operate.lte_ufe_extra.LteUfeExtra(host: str, defaultConfig: UltipaConfig, crtFilePath: str | None = None)[source]

Bases: BaseExtra

Processsing class that defines settings for LTE and UFE related operations.

lte(request: ~ultipa.types.types_request.LTE, requestConfig: ~ultipa.configuration.RequestConfig.RequestConfig = <ultipa.configuration.RequestConfig.RequestConfig object>) UltipaResponse[source]

Load properties to memory (LTE).

Args:

request: An object of LTE class requestConfig: An object of RequestConfig class

Returns:

UltipaResponse

ufe(request: ~ultipa.types.types_request.UFE, requestConfig: ~ultipa.configuration.RequestConfig.RequestConfig = <ultipa.configuration.RequestConfig.RequestConfig object>) UltipaResponse[source]

Unload properties from memory (UFE).

Args:

request: An object of UFE class requestConfig: An object of RequestConfig class

Returns:

UltipaResponse

ultipa.operate.node_extra module

class ultipa.operate.node_extra.NodeExtra(host: str, defaultConfig: UltipaConfig, crtFilePath: str | None = None)[source]

Bases: BaseExtra

Processing class that defines settings for node related operations.

deleteNode(request: ~ultipa.types.types_request.DeleteNode, requestConfig: ~ultipa.configuration.RequestConfig.RequestConfig = <ultipa.configuration.RequestConfig.RequestConfig object>) UltipaResponse[source]

Delete nodes.

Args:

request: An object of DeleteNode class

requestConfig: An object of RequestConfig class

Returns:

UltipaResponse

insertNode(request: ~ultipa.types.types_request.InsertNode, requestConfig: ~ultipa.configuration.RequestConfig.RequestConfig = <ultipa.configuration.RequestConfig.RequestConfig object>) ResponseInsert[source]

Insert nodes.

Args:

request: An object of InsertNode class

requestConfig: An object of RequestConfig class

Returns:

UltipaResponse

searchNode(request: ~ultipa.types.types_request.SearchNode, requestConfig: ~ultipa.configuration.RequestConfig.RequestConfig = <ultipa.configuration.RequestConfig.RequestConfig object>) ResponseSearchNode[source]

Query for nodes.

Args:

request: An object of SearchNode class

requestConfig: An object of RequestConfig class

Returns:

ResponseSearchNode

updateNode(request: ~ultipa.types.types_request.UpdateNode, requestConfig: ~ultipa.configuration.RequestConfig.RequestConfig = <ultipa.configuration.RequestConfig.RequestConfig object>) UltipaResponse[source]

Update nodes.

Args:

request: An object of UpdateNode class

requestConfig: An object of RequestConfig class

Returns:

UltipaResponse

ultipa.operate.policy_extra module

class ultipa.operate.policy_extra.PolicyExtra(host: str, defaultConfig: UltipaConfig, crtFilePath: str | None = None)[source]

Bases: BaseExtra

Processing class that defines settings for policy related operations.

alterPolicy(request: ~ultipa.types.types_request.AlterPolicy, requestConfig: ~ultipa.configuration.RequestConfig.RequestConfig = <ultipa.configuration.RequestConfig.RequestConfig object>) UltipaResponse[source]

Alter a policy.

Args:

request: An object of AlterPolicy class

requestConfig: An object of RequestConfig class

Returns:

UltipaResponse

createPolicy(request: ~ultipa.types.types_request.CreatePolicy, requestConfig: ~ultipa.configuration.RequestConfig.RequestConfig = <ultipa.configuration.RequestConfig.RequestConfig object>) UltipaResponse[source]

Create a policy.

Args:

request: An object of CreatePolicy class

requestConfig: An object of RequestConfig class

Returns:

UltipaResponse

dropPolicy(name: str, requestConfig: ~ultipa.configuration.RequestConfig.RequestConfig = <ultipa.configuration.RequestConfig.RequestConfig object>) UltipaResponse[source]

Drop a policy.

Args:

name: The name of policy

requestConfig: An object of RequestConfig class

Returns:

UltipaResponse

getPolicy(name: str, requestConfig: ~ultipa.configuration.RequestConfig.RequestConfig = <ultipa.configuration.RequestConfig.RequestConfig object>) ResponsePolicy[source]

Get a policy.

Args:

name: The name of policy

requestConfig: An object of RequestConfig class

Returns:

ResponsePolicy

grantPolicy(request: ~ultipa.types.types_request.GrantPolicy, requestConfig: ~ultipa.configuration.RequestConfig.RequestConfig = <ultipa.configuration.RequestConfig.RequestConfig object>) UltipaResponse[source]

Grant privileges and policies to a user.

Args:

request: An object of GrantPolicy class

requestConfig: An object of RequestConfig class

Returns:

UltipaResponse

revokePolicy(request: ~ultipa.types.types_request.RevokePolicy, requestConfig: ~ultipa.configuration.RequestConfig.RequestConfig = <ultipa.configuration.RequestConfig.RequestConfig object>) UltipaResponse[source]

Revoke privileges and policies from a user.

Args:

request: An object of RevokePolicy class

requestConfig: An object of RequestConfig class

Returns:

UltipaResponse

showPolicy(requestConfig: ~ultipa.configuration.RequestConfig.RequestConfig = <ultipa.configuration.RequestConfig.RequestConfig object>) ResponseListPolicy[source]

Show policy list.

Args:

requestConfig: An object of RequestConfig class

Returns:

ResponsePolicy

showPrivilege(requestConfig: ~ultipa.configuration.RequestConfig.RequestConfig = <ultipa.configuration.RequestConfig.RequestConfig object>) ResponseListPrivilege[source]

Show privilege list.

Args:

requestConfig: An object of RequestConfig class

Returns:

ResponseListPrivilege

ultipa.operate.property_extra module

class ultipa.operate.property_extra.PropertyExtra(host: str, defaultConfig: UltipaConfig, crtFilePath: str | None = None)[source]

Bases: BaseExtra

Processing class that defines settings for property related operations.

alterProperty(dbType: ~ultipa.structs.DBType.DBType, schema: str, property: str, newProperty: str | None = None, description: str | None = None, requestConfig: ~ultipa.configuration.RequestConfig.RequestConfig = <ultipa.configuration.RequestConfig.RequestConfig object>) UltipaResponse[source]

Alter a property.

Args:

dbType: The DBType of data (DBNODE or DBEDGE)

schema: The name of schema

property: The name of property

newProperty: The new name of property

description: The new description of property

requestConfig: An object of RequestConfig class

Returns:

UltipaResponse

createProperty(dbType: ~ultipa.structs.DBType.DBType, schema: str, prop: ~ultipa.structs.Property.Property, requestConfig: ~ultipa.configuration.RequestConfig.RequestConfig = <ultipa.configuration.RequestConfig.RequestConfig object>) UltipaResponse[source]

Create a property.

Args:

dbType: The DBType of data (DBNODE or DBEDGE)

schema: The name of schema

prop: An object of Property class

requestConfig: An object of RequestConfig class

Returns:

UltipaResponse

dropProperty(dbType: ~ultipa.structs.DBType.DBType, schema: str, property: str, requestConfig: ~ultipa.configuration.RequestConfig.RequestConfig = <ultipa.configuration.RequestConfig.RequestConfig object>) UltipaResponse[source]

Drop a property.

Args:

dbType: The DBType of data (DBNODE or DBEDGE)

schema: The name of schema

property: The name of property

requestConfig: An object of RequestConfig class

Returns:

UltipaResponse

getProperty(dbType: ~ultipa.structs.DBType.DBType, schema: str | None = None, requestConfig: ~ultipa.configuration.RequestConfig.RequestConfig = <ultipa.configuration.RequestConfig.RequestConfig object>) ResponseGetProperty[source]

Get a property.

Args:

dbType: The DBType of data (DBNODE or DBEDGE)

schema: The name of schema

requestConfig: An object of RequestConfig class

Returns:

ResponseGetProperty

listProperty(requestConfig: ~ultipa.configuration.RequestConfig.RequestConfig = <ultipa.configuration.RequestConfig.RequestConfig object>) ResponseListProperty[source]

List all properties.

Args:

requestConfig: An object of RequestConfig class

Returns:

ResponseListProperty

showProperty(requestConfig: ~ultipa.configuration.RequestConfig.RequestConfig = <ultipa.configuration.RequestConfig.RequestConfig object>) ResponseListProperty[source]

Show all properties.

Args:

requestConfig: An object of RequestConfig class

Returns:

ResponseListProperty

ultipa.operate.schema_extra module

class ultipa.operate.schema_extra.SchemaExtra(host: str, defaultConfig: UltipaConfig, crtFilePath: str | None = None)[source]

Bases: BaseExtra

Prcessing class that defines settings for schema related operations.

alterSchema(dbType: ~ultipa.structs.DBType.DBType, schemaName: str, newSchemaName: str, description: str | None = None, requestConfig: ~ultipa.configuration.RequestConfig.RequestConfig = <ultipa.configuration.RequestConfig.RequestConfig object>) UltipaResponse[source]

Alter schema.

Args:

dbType: The DBType of data (DBNODE or DBEDGE)

schemaName: The name of schema

newSchemaName: The new name of schema

description: The new description of schema

requestConfig: An object of RequestConfig class

Returns:

UltipaResponse

createSchema(schema: ~ultipa.structs.Schema.Schema, requestConfig: ~ultipa.configuration.RequestConfig.RequestConfig = <ultipa.configuration.RequestConfig.RequestConfig object>) UltipaResponse[source]

Create a schema.

Args:

schema: An object of Schema class

requestConfig: An object of RequestConfig class

Returns:

UltipaResponse

dropSchema(dbType: ~ultipa.structs.DBType.DBType, schemaName: str, requestConfig: ~ultipa.configuration.RequestConfig.RequestConfig = <ultipa.configuration.RequestConfig.RequestConfig object>) UltipaResponse[source]

Drop schema.

Args:

dbType: The DBType of data (DBNODE or DBEDGE)

schemaName: The name of schema

requestConfig: An object of RequestConfig class

Returns:

UltipaResponse

listSchema(dbType: ~ultipa.structs.DBType.DBType | None = None, schemaName: str | None = None, requestConfig: ~ultipa.configuration.RequestConfig.RequestConfig = <ultipa.configuration.RequestConfig.RequestConfig object>) UltipaResponse[source]

List schema(s).

Args:

dbType: The DBType of data (DBNODE or DBEDGE), show both types of schemas by default

schemaName: The name of designated schema, or show all schemas by default

requestConfig: An object of RequestConfig class

Returns:

UltipaResponse

showSchema(dbType: ~ultipa.structs.DBType.DBType | None = None, schemaName: str | None = None, requestConfig: ~ultipa.configuration.RequestConfig.RequestConfig = <ultipa.configuration.RequestConfig.RequestConfig object>) UltipaResponse[source]

Show schema(s).

Args:

dbType: The DBType of data (DBNODE or DBEDGE), show both types of schemas by default

schemaName: The name of designated schema, or show all schemas by default

requestConfig: An object of RequestConfig class

Returns:

UltipaResponse

ultipa.operate.subGraph_extra module

class ultipa.operate.subGraph_extra.SubGraphExtra(host: str, defaultConfig: UltipaConfig, crtFilePath: str | None = None)[source]

Bases: GraphExtra, SchemaExtra, PropertyExtra

Processing class that defines settings for subgraph creating operation.

uqlCreateSubgraph(uql: str, subGraphName: str, requestConfig: ~ultipa.configuration.RequestConfig.RequestConfig = <ultipa.configuration.RequestConfig.RequestConfig object>) UltipaResponse[source]

Create subgraph.

Args:

uql: A uql statement that returns paths.

subGraphName: Tje name of subgraph, will be auto-created if not existent

requestConfig: An object of RequestConfig class

Returns:

ultipa.operate.task_extra module

class ultipa.operate.task_extra.ALGO_RETURN_TYPE[source]

Bases: object

ALGO_RETURN_REALTIME = 1
ALGO_RETURN_VISUALIZATION = 4
ALGO_RETURN_WRITE_BACK = 2
class ultipa.operate.task_extra.TaskExtra(host: str, defaultConfig: UltipaConfig, crtFilePath: str | None = None)[source]

Bases: BaseExtra

Processing class that defines settings for task and process related operations.

clearTask(request: ~ultipa.types.types_request.ClearTask, requestConfig: ~ultipa.configuration.RequestConfig.RequestConfig = <ultipa.configuration.RequestConfig.RequestConfig object>) ResponseCommon[source]

Clear back-end tasks.

Args:

request: An object of ClearTask class

requestConfig: An object of RequestConfig class

Returns:

ResponseCommon

clusterInfo(requestConfig: ~ultipa.configuration.RequestConfig.RequestConfig = <ultipa.configuration.RequestConfig.RequestConfig object>) ClusterInfo[source]

Show cluster information.

Args:

requestConfig: An object of RequestConfig class

Returns:

ClusterInfo

kill(id: str | None = None, all: bool = False, requestConfig: ~ultipa.configuration.RequestConfig.RequestConfig = <ultipa.configuration.RequestConfig.RequestConfig object>) ResponseCommon[source]

Kill real-time processes.

Args:

id: The ID of real-time process

all: Whether to kill all real-time processes

requestConfig: An object of RequestConfig class

Returns:

ResponseCommon

showTask(request: ~ultipa.types.types_request.ShowTask, requestConfig: ~ultipa.configuration.RequestConfig.RequestConfig = <ultipa.configuration.RequestConfig.RequestConfig object>) ResponseListTask[source]

Show back-end tasks.

Args:

request: An object of ShowTask class

requestConfig: An object of RequestConfig class

Returns:

ResponseListTask

stopTask(id: str | None = None, all: bool = False, requestConfig: ~ultipa.configuration.RequestConfig.RequestConfig = <ultipa.configuration.RequestConfig.RequestConfig object>) ResponseCommon[source]

Stop back-end tasks.

Args:

id: The ID of back-end task

all: Whether to stop all back-end tasks that are computing

requestConfig: An object of RequestConfig class

Returns:

ResponseCommon

top(requestConfig: ~ultipa.configuration.RequestConfig.RequestConfig = <ultipa.configuration.RequestConfig.RequestConfig object>) ResponseListTop[source]

Top real-time processes.

Args:

requestConfig: An object of RequestConfig class

Returns:

ResponseListTop

ultipa.operate.template_extra module

ultipa.operate.truncate_extra module

class ultipa.operate.truncate_extra.TruncateExtra(host: str, defaultConfig: UltipaConfig, crtFilePath: str | None = None)[source]

Bases: BaseExtra

Processing class that defines settings for advanced operations on graphset.

compact(graph: str, requestConfig: ~ultipa.configuration.RequestConfig.RequestConfig = <ultipa.configuration.RequestConfig.RequestConfig object>) ResponseCommon[source]

Compact graphshet.

Args:

graph: The name of graphset

requestConfig: An object of RequestConfig class

Returns:

ResponseCommon

mount(graph: str, requestConfig: ~ultipa.configuration.RequestConfig.RequestConfig = <ultipa.configuration.RequestConfig.RequestConfig object>) ResponseCommon[source]

Mount graphshet.

Args:

graph: The name of graphset

requestConfig: An object of RequestConfig class

Returns:

ResponseCommon

truncate(request: ~ultipa.types.types_request.Truncate, requestConfig: ~ultipa.configuration.RequestConfig.RequestConfig = <ultipa.configuration.RequestConfig.RequestConfig object>) ResponseCommon[source]

Truncate graphshet.

Args:

request: An object of Truncate class

requestConfig: An object of RequestConfig class

Returns:

ResponseCommon

unmount(graph: str, requestConfig: ~ultipa.configuration.RequestConfig.RequestConfig = <ultipa.configuration.RequestConfig.RequestConfig object>) ResponseCommon[source]

Unmount graphshet.

Args:

graph: The name of graphset

requestConfig: An object of RequestConfig class

Returns:

ResponseCommon

ultipa.operate.user_extra module

class ultipa.operate.user_extra.UserExtra(host: str, defaultConfig: UltipaConfig, crtFilePath: str | None = None)[source]

Bases: BaseExtra

Processing class that defines settings for user related operations.

alterUser(request: ~ultipa.types.types_request.AlterUser, requestConfig: ~ultipa.configuration.RequestConfig.RequestConfig = <ultipa.configuration.RequestConfig.RequestConfig object>) UltipaResponse[source]

Alter a user.

Args:

request: An object of AlterUser class

requestConfig: An object of RequestConfig class

Returns:

UltipaResponse

createUser(request: ~ultipa.types.types_request.CreateUser, requestConfig: ~ultipa.configuration.RequestConfig.RequestConfig = <ultipa.configuration.RequestConfig.RequestConfig object>) UltipaResponse[source]

Create a user.

Args:

request: An object of CreateUser class

requestConfig: An object of RequestConfig class

Returns:

UltipaResponse

dropUser(username: str, requestConfig: ~ultipa.configuration.RequestConfig.RequestConfig = <ultipa.configuration.RequestConfig.RequestConfig object>) UltipaResponse[source]

Drop a user.

Args:

username: The name of user

requestConfig: An object of RequestConfig class

Returns:

UltipaResponse

getSelfInfo(requestConfig: ~ultipa.configuration.RequestConfig.RequestConfig = <ultipa.configuration.RequestConfig.RequestConfig object>) UltipaResponse[source]

Get the current user.

Args:

requestConfig: An object of RequestConfig class

Returns:

UltipaResponse

getUser(username: str, requestConfig: ~ultipa.configuration.RequestConfig.RequestConfig = <ultipa.configuration.RequestConfig.RequestConfig object>) ResponseUser[source]

Get a designated user.

Args:

username: The name of user

requestConfig: An object of RequestConfig class

Returns:

ResponseUser

showUser(requestConfig: ~ultipa.configuration.RequestConfig.RequestConfig = <ultipa.configuration.RequestConfig.RequestConfig object>) ResponseListUser[source]

Show user list.

Args:

requestConfig: An object of RequestConfig class

Returns:

ResponseListUser

Module contents