> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# By Priority • Rust AI Agent SDK

> by_priority: Get items by priority.

# by\_priority

<div className="flex items-center gap-2">
  <Badge color="purple">Method</Badge>
</div>

> This is a method of the [**TodoList**](../classes/TodoList) class in the [**planning**](../modules/planning) module.

Get items by priority.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def by_priority(&self, priority: TodoPriority) -> Vec<&TodoItem>
```

## Parameters

<ParamField query="priority" type="TodoPriority" required={true}>
  No description available.
</ParamField>

### Returns

<ResponseField name="Returns" type="Vec<&TodoItem>">
  The result of the operation.
</ResponseField>
