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

# Contracts.with\_event\_prefix()

`with_event_prefix(prefix: str, sensitivity: bool = True) ->` [`Contracts`]()

## 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&#x26;token=64e22020-4ca5-48f7-be24-b622c53cb0d3" alt=""><figcaption></figcaption></figure>
