# pydantic_copy

> **Function** in `langchain_core`

📖 [View in docs](https://reference.langchain.com/python/langchain-core/tracers/_compat/pydantic_copy)

Copy any Pydantic model, compatible with both v1 and v2.

## Signature

```python
pydantic_copy(
    obj: T,
    **kwargs: Any = {},
) -> T
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `obj` | `T` | Yes | The Pydantic model to copy. |
| `**kwargs` | `Any` | No | Additional arguments passed to `model_copy`/`copy`. (default: `{}`) |

## Returns

`T`

A copy of the model.

---

[View source on GitHub](https://github.com/langchain-ai/langchain/blob/f0c5a28fa05adcda89aebcb449d897245ab21fa4/libs/core/langchain_core/tracers/_compat.py#L83)