-
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
Open
scmacdon
wants to merge
19
commits into
awsdocs:main
Choose a base branch
from
scmacdon:neptunepy
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+2,937
−41
Open
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
cfffdd3
add python neptune follow
scmacdon 67b8e9e
added Hello Neptune
scmacdon 2c28b21
added Hello Neptune
scmacdon 1003c0e
added data Neptune examples
scmacdon 9d8fbae
added data Neptune examples
scmacdon 9602110
added python to SOS
scmacdon 61d4de2
added python to SOS
scmacdon 281c96d
added python to SOS
scmacdon 194a234
added python to SOS
scmacdon 97bd8b8
added Readme
scmacdon 43f9145
added Readme
scmacdon 3c971ff
Merge branch 'main' into neptunepy
beqqrry-aws d2e8089
rolled in review comments
scmacdon 2b3de9e
rolled in review comments
scmacdon a8c9e2d
rolled in review comments
scmacdon 049ae7b
rolled in review comments
scmacdon 0e6e9dd
rolled in review comments
scmacdon c20c387
rolled in reivew comments
scmacdon 0281100
rolled in reivew comments
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.