# `SnakeBridge.Adapter`
[🔗](https://github.com/nshkrdotcom/snakebridge/blob/v0.16.0/lib/snakebridge/adapter.ex#L1)

Provides the `use SnakeBridge.Adapter` macro for generated Python adapters.

When you `use SnakeBridge.Adapter`, it imports the `__python_call__/2` function
that generated adapters use to call Python functions via Snakepit.

## Example

    defmodule MyApp.Math do
      use SnakeBridge.Adapter

      @spec sqrt(number()) :: float()
      def sqrt(x) do
        __python_call__("sqrt", [x])
      end
    end

The adapter module tracks the Python module name and provides the runtime
bridge to execute Python functions.

# `__python_call__`

```elixir
@spec __python_call__(String.t(), list()) ::
  {:ok, term()} | {:error, SnakeBridge.Runtime.error_reason()}
```

Calls a Python function with the given arguments using SnakeBridge.Runtime.

---

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