> 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/statevariables/statevariables/statevariables.with_one_property.md).

# StateVariables.with\_one\_property()

Adds a filter to get state variables that at least have one of the given properties.

`with_one_property(properties: List[`[`StateVariableProp`](/glider-ide/api/variables/statevariables/statevariableprop.md)`]) →` [`StateVariables`](/glider-ide/api/variables/statevariables/statevariables.md)

## Query Example

```python
from glider import *


def query():
  state_variables = (
    StateVariables()
    .with_one_property([StateVariableProp.PRIVATE, StateVariableProp.PUBLIC])
    .exec(5)
  )

  print(state_variables[0].source_code())
  print(state_variables[1].source_code())

  return state_variables
```

## Example Output

<figure><img src="https://2237101709-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDX4Ojc4j1ef51TUAtYOx%2Fuploads%2FM4kMzVmwrkaG0PF0KdcZ%2Fimage.png?alt=media&amp;token=a083e0c8-ca74-46c7-8e9c-625f4eafd925" alt=""><figcaption></figcaption></figure>
