> For the complete documentation index, see [llms.txt](https://docs.r.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.r.xyz/glider-ide/api/contracts/contracts.with_event_prefix.md).

# Contracts.with\_event\_prefix()

Adds a filter to get contracts that have an event whose name has the given prefix.

`with_event_prefix(prefix: str, sensitivity: bool = True) ->` [`Contracts`](/glider-ide/api/contracts.md)

## Query Example

```python
from glider import *

def query():
  contracts = Contracts().with_event_prefix("role", sensitivity=False).exec(1)
  events = contracts[0].events()
  for event in events:
    print(event.signature)

  return contracts
```

## Output Example

<figure><img src="https://2237101709-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDX4Ojc4j1ef51TUAtYOx%2Fuploads%2FdlyQ5zhLuT21Bm0y07P8%2Fimage.png?alt=media&amp;token=64e22020-4ca5-48f7-be24-b622c53cb0d3" alt=""><figcaption></figcaption></figure>
