---
name: parse_page_range
kind: function
lang: py
domain: core
version: "1.0.0"
purity: pure
signature: "def parse_page_range(pages: str) -> list[int]"
description: "Parsea string de rangos de paginas ('5-7', '3,8', '12') a lista de enteros ordenada y sin duplicados."
tags: [parsing, range, pages, string]
uses_functions: []
uses_types: []
returns: []
returns_optional: false
error_type: ""
imports: []
params:
  - name: pages
    desc: "String con especificación de páginas (ej: '5-7,3,10-12')"
output: "Lista ordenada de números de página sin duplicados"
tested: false
tests: []
test_file_path: ""
file_path: "python/functions/core/core.py"
source_repo: "https://github.com/VectifyAI/PageIndex"
source_license: "MIT"
source_file: "pageindex/retrieve.py"
---

## Ejemplo

```python
parse_page_range("1-3,7,10-12")
# [1, 2, 3, 7, 10, 11, 12]

parse_page_range("5")
# [5]
```

## Notas

Funcion pura. Lanza ValueError si un rango tiene start > end.
