> ## 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`](/sdk-reference/io/wsi/factory#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
```

Extracts and normalizes the file extension from a path.

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

**Returns**:

Lowercase file extension including the leading dot.

## WSI

```python theme={null}
class WSI(path: str, backend: Optional[Union[Backend, str]] = Backend.AUTO)
```

Factory class for creating WSI readers with automatic backend selection.

Usage:

```python 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]
```

Returns the list of valid backend string values (excluding AUTO).

***

#### supported\_extensions

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

Returns the list of all supported file extensions.

**Returns**:

List of extension strings (e.g. `[".svs", ".tiff", ...]`).

***

#### available\_backends

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

Returns the availability status of all physical backends.

**Returns**:

Mapping of backend name to availability boolean.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.