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 details)

Uploaded Python 2 Python 3

File details

Details for the file gshttpservice-0.1.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for gshttpservice-0.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 5a97eceb23eeebb9d4af10c18fd8f2cb0d2faec21c4e605baa98408864743de5
MD5 f87fc8a13419734fe4e3f7c62618ce62
BLAKE2b-256 461d2f23b427e21989c47a05b1e79d5a907ae2e50c7c3d2aac2458b3b983f2a8

See more details on using hashes here.

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