# `Redix.URI`
[🔗](https://github.com/whatyouhide/redix/blob/v1.8.0/lib/redix/uri.ex#L1)

This module provides functions to work with a Redis URI.

This is generally intended for library developers using Redix under the hood.

# `to_start_options`
*since 1.2.0* 

```elixir
@spec to_start_options(binary()) :: Keyword.t()
```

Returns start options from a Redis URI.

A **Redis URI** looks like this:

    redis://[username:password@]host[:port][/db]

> #### Valkey {: .tip}
>
> URIs also work with [Valkey](https://valkey.io/), a Redis-compatible in-memory key-value
> store. Use `valkey://` as the scheme instead of `redis://`.

## Examples

    iex> Redix.URI.to_start_options("redis://example.com")
    [host: "example.com"]

    iex> Redix.URI.to_start_options("rediss://username:password@example.com:5000/3")
    [ssl: true, database: 3, password: "password", username: "username", port: 5000, host: "example.com"]

---

*Consult [api-reference.md](api-reference.md) for complete listing*
