# `Snakepit.PythonVersion`
[🔗](https://github.com/nshkrdotcom/snakepit/blob/v0.13.0/lib/snakepit/python_version.ex#L1)

Detects the active Python runtime version and recommends worker profiles.

> #### Legacy Optional Module {: .warning}
>
> `Snakepit` does not call this module internally. It remains available for
> compatibility and may be removed in `v0.16.0` or later.
>
> Prefer `Snakepit.PythonRuntime` for runtime resolution and explicit
> worker-profile selection in your application configuration.

# `version`

```elixir
@type version() :: {non_neg_integer(), non_neg_integer(), non_neg_integer()}
```

# `detect`

```elixir
@spec detect() :: {:ok, version()} | {:error, term()}
```

# `detect`

```elixir
@spec detect(binary()) :: {:ok, version()} | {:error, term()}
```

# `recommend_profile`

```elixir
@spec recommend_profile() :: :process | :thread
```

# `recommend_profile`

```elixir
@spec recommend_profile(version()) :: :process | :thread
```

# `supports_free_threading?`

```elixir
@spec supports_free_threading?(version()) :: boolean()
```

# `validate`

```elixir
@spec validate() :: :ok | {:error, term()}
```

---

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