Neptune
Amazon Neptune
The Neptune API provides a graph database to store nodes and edges that can be accessed via Apache TinkerPop and Gremlin queries.
For example, you can create a Neptune cluster like this:
import boto3
from gremlin_python.driver import client as gremlin_client
client = boto3.client('neptune', endpoint_url='http://localhost:4566')
cluster = client.create_db_cluster(DBClusterIdentifier='c1', Engine='neptune')['DBCluster']
cluster_url = 'ws://localhost:%s/gremlin' % cluster['Port']
graph_client = gremlin_client.Client(cluster_url, 'g')
… and then submit and query values to the DB like this:
values = '[1,2,3,4]'
result_set = graph_client.submit(values)
results = result_set.all().result()
assert results == [1, 2, 3, 4]
For a simple Neptune sample running on LocalStack, please refer to this Github repository.
Last modified October 8, 2021: rename Local AWS Services to aws (fa6b2e4a)
当前内容版权归 LocalStack 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 LocalStack .