-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Python Add the Amazon Neptune Python follow #7473
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
d11c60e
add python neptune follow
scmacdon 0cf2601
added Hello Neptune
scmacdon 9a2d5ed
added Hello Neptune
scmacdon cf149c4
added data Neptune examples
scmacdon e904004
added data Neptune examples
scmacdon 3ae7cb4
added python to SOS
scmacdon 43b598d
added python to SOS
scmacdon 2cc5ac2
added python to SOS
scmacdon 500e56b
added python to SOS
scmacdon 09ed0a6
added Readme
scmacdon 88a8922
added Readme
scmacdon 748e48e
rolled in review comments
scmacdon d42cc93
rolled in review comments
scmacdon 6fc1e4b
rolled in review comments
scmacdon 09e6c63
rolled in review comments
scmacdon 685bf20
rolled in review comments
scmacdon b59040b
rolled in reivew comments
scmacdon 7323206
rolled in reivew comments
scmacdon e297b85
rolled in more comments
scmacdon d2fe7b1
fixed tag
scmacdon 7e35908
more review comments
scmacdon 0203ece
more review comments
scmacdon 5060101
more review comments
scmacdon 0991f9b
makde updates to exceptions and tests
scmacdon b983e70
update some tests
scmacdon 4ee3b76
moved stubber to propet location
scmacdon 363c46b
fixed a liner issue
scmacdon bd4bb1c
fixed a liner issue
scmacdon 833c6ae
fixed a liner issue
scmacdon 74e6631
fixed a liner issue
scmacdon 25d24dd
added requirements file
scmacdon 77d70f7
updated scenario
scmacdon File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,142 @@ | ||
# Neptune code examples for the SDK for Python | ||
|
||
## Overview | ||
|
||
Shows how to use the AWS SDK for Python (Boto3) to work with Amazon Neptune. | ||
|
||
<!--custom.overview.start--> | ||
<!--custom.overview.end--> | ||
|
||
_Neptune is a serverless graph database designed for superior scalability and availability._ | ||
|
||
## ⚠ Important | ||
|
||
* Running this code might result in charges to your AWS account. For more details, see [AWS Pricing](https://aws.amazon.com/pricing/) and [Free Tier](https://aws.amazon.com/free/). | ||
* Running the tests might result in charges to your AWS account. | ||
* We recommend that you grant your code least privilege. At most, grant only the minimum permissions required to perform the task. For more information, see [Grant least privilege](https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#grant-least-privilege). | ||
* This code is not tested in every AWS Region. For more information, see [AWS Regional Services](https://aws.amazon.com/about-aws/global-infrastructure/regional-product-services). | ||
|
||
<!--custom.important.start--> | ||
<!--custom.important.end--> | ||
|
||
## Code examples | ||
|
||
### Prerequisites | ||
|
||
For prerequisites, see the [README](../../README.md#Prerequisites) in the `python` folder. | ||
|
||
Install the packages required by these examples by running the following in a virtual environment: | ||
|
||
``` | ||
python -m pip install -r requirements.txt | ||
``` | ||
|
||
<!--custom.prerequisites.start--> | ||
<!--custom.prerequisites.end--> | ||
|
||
### Get started | ||
|
||
- [Hello Neptune](HelloNeptune.py#L4) (`DescribeDBClustersPaginator`) | ||
|
||
|
||
### Basics | ||
|
||
Code examples that show you how to perform the essential operations within a service. | ||
|
||
- [Learn the basics](NeptuneScenario.py) | ||
|
||
|
||
### Single actions | ||
|
||
Code excerpts that show you how to call individual service functions. | ||
|
||
- [CreateDBCluster](NeptuneScenario.py#L288) | ||
- [CreateDBInstance](NeptuneScenario.py#L269) | ||
- [CreateDBSubnetGroup](NeptuneScenario.py#L335) | ||
- [CreateGraph](analytics/CreateNeptuneGraphExample.py#L7) | ||
- [DeleteDBCluster](NeptuneScenario.py#L14) | ||
- [DeleteDBInstance](NeptuneScenario.py#L77) | ||
- [DeleteDBSubnetGroup](NeptuneScenario.py#L95) | ||
- [DescribeDBClusters](NeptuneScenario.py#L203) | ||
- [DescribeDBInstances](NeptuneScenario.py#L242) | ||
- [ExecuteGremlinProfileQuery](database/NeptuneGremlinQueryExample.py#L22) | ||
- [ExecuteGremlinQuery](database/NeptuneGremlinExplainAndProfileExample.py#L8) | ||
- [ExecuteOpenCypherExplainQuery](database/OpenCypherExplainExample.py#L22) | ||
- [ExecuteQuery](analytics/NeptuneAnalyticsQueryExample.py#L7) | ||
- [StartDBCluster](NeptuneScenario.py#L161) | ||
- [StopDBCluster](NeptuneScenario.py#L183) | ||
|
||
|
||
<!--custom.examples.start--> | ||
<!--custom.examples.end--> | ||
|
||
## Run the examples | ||
|
||
### Instructions | ||
|
||
|
||
<!--custom.instructions.start--> | ||
<!--custom.instructions.end--> | ||
|
||
#### Hello Neptune | ||
|
||
This example shows you how to get started using Neptune. | ||
|
||
``` | ||
python HelloNeptune.py | ||
``` | ||
|
||
#### Learn the basics | ||
|
||
This example shows you how to do the following: | ||
|
||
- Create an Amazon Neptune Subnet Group. | ||
- Create an Neptune Cluster. | ||
- Create an Neptune Instance. | ||
- Check the status of the Neptune Instance. | ||
- Show Neptune cluster details. | ||
- Stop the Neptune cluster. | ||
- Start the Neptune cluster. | ||
- Delete the Neptune Assets. | ||
|
||
<!--custom.basic_prereqs.neptune_Scenario.start--> | ||
<!--custom.basic_prereqs.neptune_Scenario.end--> | ||
|
||
Start the example by running the following at a command prompt: | ||
|
||
``` | ||
python NeptuneScenario.py | ||
``` | ||
|
||
|
||
<!--custom.basics.neptune_Scenario.start--> | ||
<!--custom.basics.neptune_Scenario.end--> | ||
|
||
|
||
### Tests | ||
|
||
⚠ Running tests might result in charges to your AWS account. | ||
|
||
|
||
To find instructions for running these tests, see the [README](../../README.md#Tests) | ||
in the `python` folder. | ||
|
||
|
||
|
||
<!--custom.tests.start--> | ||
<!--custom.tests.end--> | ||
|
||
## Additional resources | ||
|
||
- [Neptune User Guide](https://docs.aws.amazon.com/neptune/latest/userguide/intro.html) | ||
- [Neptune API Reference](https://docs.aws.amazon.com/neptune/latest/apiref/Welcome.html) | ||
- [SDK for Python Neptune reference](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/iam.html) | ||
|
||
<!--custom.resources.start--> | ||
<!--custom.resources.end--> | ||
|
||
--- | ||
|
||
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
|
||
SPDX-License-Identifier: Apache-2.0 |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.