Coordinator Python SDK 参考文档¶
这是基于OpenAPI 3.0规范的GraphScope FLEX HTTP服务规范。您可以在doc中查看关于该规范的更多详细信息。
这个Python包是由OpenAPI Generator项目自动生成的:
API 版本: 1.0.0
软件包版本:1.0.0
生成器版本:7.8.0
构建包:org.openapitools.codegen.languages.PythonClientCodegen
系统要求.¶
Python 3.7+
安装与使用¶
pip安装¶
如果Python包托管在代码仓库中,您可以直接通过以下方式安装:
pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
(你可能需要使用root权限运行pip:sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git)
然后导入该包:
import graphscope.flex.rest
Setuptools¶
通过Setuptools安装。
python setup.py install --user
(或使用 sudo python setup.py install 为所有用户安装该软件包)
然后导入该包:
import graphscope.flex.rest
测试¶
执行 pytest 来运行测试。
快速开始¶
请按照安装步骤进行操作,然后运行以下命令:
import graphscope.flex.rest
from graphscope.flex.rest.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = graphscope.flex.rest.Configuration(
host = "http://localhost"
)
# Enter a context with an instance of the API client
with graphscope.flex.rest.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = graphscope.flex.rest.AlertApi(api_client)
create_alert_receiver_request = graphscope.flex.rest.CreateAlertReceiverRequest() # CreateAlertReceiverRequest |
try:
api_response = api_instance.create_alert_receiver(create_alert_receiver_request)
print("The response of AlertApi->create_alert_receiver:\n")
pprint(api_response)
except ApiException as e:
print("Exception when calling AlertApi->create_alert_receiver: %s\n" % e)
API端点文档¶
所有URI均相对于http://localhost
类 |
方法 |
HTTP请求 |
描述 |
|---|---|---|---|
AlertApi |
POST /api/v1/alert/receiver |
||
AlertApi |
DELETE /api/v1/alert/message-collection |
||
AlertApi |
DELETE /api/v1/alert/receiver/{receiver_id} |
||
AlertApi |
DELETE /api/v1/alert/rule/{rule_id} |
||
AlertApi |
GET /api/v1/alert/message |
||
AlertApi |
GET /api/v1/alert/receiver |
||
AlertApi |
GET /api/v1/alert/rule |
||
AlertApi |
PUT /api/v1/alert/message-collection/status |
||
AlertApi |
PUT /api/v1/alert/receiver/{receiver_id} |
||
AlertApi |
PUT /api/v1/alert/rule/{rule_id} |
||
DataSourceApi |
POST /api/v1/graph/{graph_id}/datasource |
||
DataSourceApi |
GET /api/v1/graph/{graph_id}/datasource |
||
DataSourceApi |
DELETE /api/v1/graph/{graph_id}/datasource/edge/{type_name} |
||
DataSourceApi |
DELETE /api/v1/graph/{graph_id}/datasource/vertex/{type_name} |
||
DeploymentApi |
GET /api/v1/deployment |
||
DeploymentApi |
GET /api/v1/deployment/log |
||
DeploymentApi |
GET /api/v1/deployment/resource/usage |
||
DeploymentApi |
GET /api/v1/deployment/status |
||
DeploymentApi |
GET /api/v1/deployment/storage/usage |
||
GraphApi |
POST /api/v1/graph/{graph_id}/schema/edge |
||
GraphApi |
POST /api/v1/graph |
||
GraphApi |
POST /api/v1/graph/{graph_id}/schema/vertex |
||
GraphApi |
DELETE /api/v1/graph/{graph_id}/schema/edge/{type_name} |
||
GraphApi |
DELETE /api/v1/graph/{graph_id} |
||
GraphApi |
DELETE /api/v1/graph/{graph_id}/schema/vertex/{type_name} |
||
GraphApi |
GET /api/v1/graph/{graph_id} |
||
GraphApi |
GET /api/v1/graph/{graph_id}/schema |
||
GraphApi |
POST /api/v1/graph/{graph_id}/schema |
||
GraphApi |
GET /api/v1/graph |
||
JobApi |
DELETE /api/v1/job/{job_id} |
||
JobApi |
POST /api/v1/graph/{graph_id}/dataloading/config |
||
JobApi |
GET /api/v1/job/{job_id} |
||
JobApi |
GET /api/v1/job |
||
JobApi |
POST /api/v1/graph/{graph_id}/dataloading |
||
ServiceApi |
GET /api/v1/graph/{graph_id}/service |
||
ServiceApi |
GET /api/v1/service |
||
ServiceApi |
POST /api/v1/service/restart |
||
ServiceApi |
POST /api/v1/service/start |
||
ServiceApi |
POST /api/v1/service/stop |
||
StoredProcedureApi |
POST /api/v1/graph/{graph_id}/storedproc |
||
StoredProcedureApi |
DELETE /api/v1/graph/{graph_id}/storedproc/{stored_procedure_id} |
||
存储过程API |
GET /api/v1/graph/{graph_id}/storedproc/{stored_procedure_id} |
||
StoredProcedureApi |
GET /api/v1/graph/{graph_id}/storedproc |
||
StoredProcedureApi |
PUT /api/v1/graph/{graph_id}/storedproc/{stored_procedure_id} |
||
UtilsApi |
POST /api/v1/file/uploading |