> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/nemo/guardrails/llms.txt.
> For full documentation content, see https://docs.nvidia.com/nemo/guardrails/llms-full.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/nemo/guardrails/_mcp/server.

# nemoguardrails.patch_asyncio

## Module Contents

### Functions

| Name                                                                                               | Description                                                |
| -------------------------------------------------------------------------------------------------- | ---------------------------------------------------------- |
| [`apply`](#nemoguardrails-patch_asyncio-apply)                                                     | -                                                          |
| [`check_sync_call_from_async_loop`](#nemoguardrails-patch_asyncio-check_sync_call_from_async_loop) | Helper to check if a sync call is made from an async loop. |

### Data

[`nest_asyncio_patch_applied`](#nemoguardrails-patch_asyncio-nest_asyncio_patch_applied)

### API

```python
nemoguardrails.patch_asyncio.apply()
```

```python
nemoguardrails.patch_asyncio.check_sync_call_from_async_loop()
```

Helper to check if a sync call is made from an async loop.

Returns
True if a sync call is made from an async loop.

```python
nemoguardrails.patch_asyncio.nest_asyncio_patch_applied = False
```