Skip to main content

Http server wrapper for standalone GraphScope

Project description

Install


$ python3 setup.py bdist_wheel
$ cd dist && pip3 install ./*.whl

Launch http service


$ python3 -m gshttpservice 9527

API

Create instance


POST /api/graphservice/createInstance

> body
> {
>    "num_workers": 2,
>    "vineyard_shared_mem": "4Gi"
> }

See more parameter details from Doc

Get instance


GET /api/graphservice/getInstance

Load data


POST /api/graphservice/loadData

> body
> {
>    "type": "LOCAL",
>    "directed": true,
>    "oid_type": "string",
>    "instance_id": "<graphscope instance id>",
>    "dataSource": {
>        "nodes": [
>            {
>                "label": "v",
>                "location": "",
>                "config": {
>                    "header_row": true,
>                    "delimiter": ","
>                }
>            }
>        ],
>        "edges": [
>            {
>                "label": "e",
>                "location": "",
>                "srcLabel": "v",
>                "dstLabel": "v",
>                "config": {
>                    "header_row": true,
>                    "delimiter": ","
>                }
>            }
>        ]
>    }
>}

Get graph schema


GET /api/graphservice/graphSchema

> params
> {
>     "graph_name": ""
> }

Gremlin query


GET /api/graphservice/query/gremlin

> params
> {
>    "graph_name": <graph for gremlin query>,
>    "gremlinSQL": "g.V('1')"
> }

Close instance


GET /api/graphservice/closeInstance

> params
> {
>     "instance_id": <graphscope instance to close>,
> }

Upload file


POST /api/graphservice/uploadFile

> header
> {
>   Content-Type: multipart/form-data
> }
>
> body
> {
>   file=@file_path,
>   instance_id="instance_id"
> }

> example
> curl -i -X POST -H "Content-Type: multipart/form-data" -F "file=@file1" -F "file=@file2" -F "instance_id=xxx" -w %{http_code} http://localhost:9527/api/graphservice/uploadFile

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

gshttpservice-0.1.0-py2.py3-none-any.whl (13.0 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page