# Installation (/docs/python/getting-started/installation)



```bash
pip install tawaguard-sdk
```

Requires Python 3.9+. The only runtime dependency is
[`httpx`](https://www.python-httpx.org/).

## Construct the client [#construct-the-client]

`tawaguard-sdk` ships both a sync (`TawaGuard`) and an async (`AsyncTawaGuard`)
client, with the same method surface.

<Tabs items="[&#x22;Sync&#x22;, &#x22;Async&#x22;]">
  <Tab value="Sync">
    ```python
    import os
    from tawaguard import TawaGuard

    client = TawaGuard(os.environ["TAWA_API_KEY"])
    ```

    By default the sync constructor verifies your key against `/verify`
    immediately — a bad key raises `TawaAPIError` at construction time rather
    than on the first scan call.
  </Tab>

  <Tab value="Async">
    ```python
    import os
    from tawaguard import AsyncTawaGuard

    client = await AsyncTawaGuard.create(os.environ["TAWA_API_KEY"])
    ```

    `AsyncTawaGuard.create` verifies eagerly, the same way the sync client does.
    Constructing `AsyncTawaGuard(...)` directly instead is lazy — see
    [Configuration](/docs/python/sdk/client) for the full breakdown of eager vs.
    lazy verification.
  </Tab>
</Tabs>

<Callout type="warn">
  Keep your secret key server-side. Don't ship it to the browser or commit
  it.
</Callout>

<Callout type="info">
  Using the OpenAI Agents SDK? See the
  [OpenAI Agents SDK integration](/docs/python/integrations/openai-agents-sdk) for
  a guardrail helper built on top of this client.
</Callout>
