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

# bioptimus.io.wsi.factory

Factory for WSI reader instantiation with automatic backend selection.

Provides the `WSI` convenience class that selects the best available backend (CuCIM, OpenSlide, TiffSlide) based on the file extension and installed libraries.

#### get\_extension

```python theme={null}
def get_extension(path: str) -> str
```

Extract and normalize file extension from a path.

<ParamField body="path" type="str" required>
  File path or filename string.
</ParamField>

<ResponseField name="returns" type="str">
  Lowercase file extension including the leading dot.
</ResponseField>

## WSI

```python theme={null}
class WSI()
```

Factory class for creating WSI readers with automatic backend selection.

Usage:

```pycon theme={null}
>>> reader = WSI("slide.svs", backend=WSI.Backend.AUTO)
>>> reader = WSI("slide.svs", backend=WSI.Backend.OPENSLIDE)
```

## Backend

```python theme={null}
class Backend(str, Enum)
```

Supported backend identifiers and the AUTO selection flag.

#### list

```python theme={null}
@classmethod
def list(cls) -> List[str]
```

Return list of valid backend string values (excluding AUTO).

#### supported\_extensions

```python theme={null}
@classmethod
def supported_extensions(cls) -> List[str]
```

Get list of all supported file extensions.

<ResponseField name="returns" type="List[str]">
  List of extension strings (e.g. `[".svs", ".tiff", ...]`).
</ResponseField>

#### available\_backends

```python theme={null}
@classmethod
def available_backends(cls) -> Dict[str, bool]
```

Get availability status of all physical backends.

<ResponseField name="returns" type="Dict[str, bool]">
  Mapping of backend name to availability boolean.
</ResponseField>
