# get_bedrock_anthropic_callback

> **Function** in `langchain_community`

📖 [View in docs](https://reference.langchain.com/python/langchain-community/callbacks/manager/get_bedrock_anthropic_callback)

Get the Bedrock anthropic callback handler in a context manager.
which conveniently exposes token and cost information.

## Signature

```python
get_bedrock_anthropic_callback() -> Generator[BedrockAnthropicTokenUsageCallbackHandler, None, None]
```

## Description

**Example:**

>>> with get_bedrock_anthropic_callback() as cb:
...     # Use the Bedrock anthropic callback handler

## Returns

`None`


The Bedrock anthropic callback handler.

---

[View source on GitHub](https://github.com/langchain-ai/langchain-community/blob/a6a6079511ac8a5c1293337f88096b8641562e77/libs/community/langchain_community/callbacks/manager.py#L63)