# NeptuneGraph

> **Class** in `langchain_community`

📖 [View in docs](https://reference.langchain.com/python/langchain-community/graphs/neptune_graph/NeptuneGraph)

Neptune wrapper for graph operations.

## Signature

```python
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,
)
```

## Description

**Example:**

.. code-block:: python

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://python.langchain.com/docs/security for more information.

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `host` | `str` | Yes | endpoint for the database instance |
| `port` | `int` | No | port number for the database instance, default is 8182 (default: `8182`) |
| `use_https` | `bool` | No | whether to use secure connection, default is True (default: `True`) |
| `client` | `Any` | No | optional boto3 Neptune client (default: `None`) |
| `credentials_profile_name` | `Optional[str]` | No | optional AWS profile name (default: `None`) |
| `region_name` | `Optional[str]` | No | optional AWS region, e.g., us-west-2 (default: `None`) |
| `sign` | `bool` | No | optional, whether to sign the request payload, default is True (default: `True`) |

## Extends

- `BaseNeptuneGraph`

## Constructors

```python
__init__(
    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,
) -> None
```

| Name | Type |
|------|------|
| `host` | `str` |
| `port` | `int` |
| `use_https` | `bool` |
| `client` | `Any` |
| `credentials_profile_name` | `Optional[str]` |
| `region_name` | `Optional[str]` |
| `sign` | `bool` |


## Properties

- `client`

## Methods

- [`query()`](https://reference.langchain.com/python/langchain-community/graphs/neptune_graph/NeptuneGraph/query)

## ⚠️ Deprecated

Deprecated since version 0.3.15.

---

[View source on GitHub](https://github.com/langchain-ai/langchain-community/blob/4b280287bd55b99b44db2dd849f02d66c89534d5/libs/community/langchain_community/graphs/neptune_graph.py#L279)