> 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/variables/localvariables/localvariables/localvariables.with_type.md).

# LocalVariables.with\_type()

Returns the list of local variables having specified type.

`with_type(var_type: str) →` [`APIList`](/glider-ide/api/iterables/apilist.md)`[`[`LocalVariable`](/glider-ide/api/variables/localvariables/localvariable.md)`]`

## Query Example

```python
from glider import *


def query():
  functions = (
    Functions()
    .with_name("purchaseDataset")
    .exec(1)
  )

  for func in functions:
    local_vars = func.local_variables().with_type("address")
    for local_var in local_vars:
      print(local_var.source_code())

  return functions
```

## Example Output

<figure><img src="https://2237101709-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDX4Ojc4j1ef51TUAtYOx%2Fuploads%2FvY4w7ZbQpWo60NN2cAw5%2FScreenshot%202025-09-10%20at%203.57.27%E2%80%AFPM.png?alt=media&amp;token=1477d2c3-7809-4e64-8e35-130d941c560e" alt=""><figcaption></figcaption></figure>
