Neptune wrapper for graph operations.
NeptuneGraph(
self,
host: str,
port: int = 8182,
use_https: bool = True,
client: Any = None,
credentials_profile_name: Optional[str] = None,
region_name: Optional[str] = None,
sign: bool = True,
aws_access_key_id: Optional[SecretStr] = None,
aws_secret_access_key: Optional[SecretStr] = None,
aws_session_token: Optional[SecretStr] = None,
endpoint_url: Optional[str] = None,
config: Optional[Config] = None,
property_descriptions: Optional[Dict[Tuple[str, str], str]] = None
)Example:
graph = NeptuneGraph(
host='<my-cluster>',
port=8182
)
Security note: Make sure that the database connection uses credentials that are narrowly-scoped to only include necessary permissions. Failure to do so may result in data corruption or loss, since the calling code may attempt commands that would result in deletion, mutation of data if appropriately prompted or reading sensitive data if such data is present in the database. The best way to guard against such negative outcomes is to (as appropriate) limit the permissions granted to the credentials used with this tool.
See https://docs.langchain.com/oss/python/security-policy for more information.
| Name | Type | Description |
|---|---|---|
host* | str | endpoint for the database instance |
port | int | Default: 8182port number for the database instance, default is 8182 |
use_https | bool | Default: Truewhether to use secure connection, default is True |
client | Any | Default: Noneoptional boto3 Neptune client |
credentials_profile_name | Optional[str] | Default: Noneoptional AWS profile name |
region_name | Optional[str] | Default: Noneoptional AWS region, e.g., us-west-2 |
sign | bool | Default: Truewhether to sign the request payload, default is True |
aws_access_key_id | Optional[SecretStr] | Default: Noneoptional AWS access key ID |
aws_secret_access_key | Optional[SecretStr] | Default: Noneoptional AWS secret access key |
aws_session_token | Optional[SecretStr] | Default: Noneoptional AWS session token |
endpoint_url | Optional[str] | Default: Noneoptional custom endpoint URL |
config | Optional[Config] | Default: Noneoptional botocore Config object |
| Name | Type |
|---|---|
| host | str |
| port | int |
| use_https | bool |
| client | Any |
| credentials_profile_name | Optional[str] |
| region_name | Optional[str] |
| sign | bool |
| aws_access_key_id | Optional[SecretStr] |
| aws_secret_access_key | Optional[SecretStr] |
| aws_session_token | Optional[SecretStr] |
| endpoint_url | Optional[str] |
| config | Optional[Config] |
| property_descriptions | Optional[Dict[Tuple[str, str], str]] |