> 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_compiler_range.md).

# Contracts.with\_compiler\_range()

Adds a filter to get contracts whose compilation version is in the given range.

`with_compiler_range(lower_bound: str, upper_bound: str) ->` [`Contracts`](/glider-ide/api/contracts.md)

## Query Example

```python
from glider import *

def query():
  contracts = Contracts().with_compiler_range("0.4.20", "0.4.24").exec(3)

  for contract in contracts:
    print(contract.pragmas())

  return contracts
```

## Output Example

<figure><img src="https://2237101709-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDX4Ojc4j1ef51TUAtYOx%2Fuploads%2FmsUOoCJkWAXxanLrwNiw%2Fimage.png?alt=media&amp;token=a4b5ed97-54d6-432d-858a-4d261ff6b075" alt=""><figcaption></figcaption></figure>
