> ## Documentation Index
> Fetch the complete documentation index at: https://docs.law4devs.eu/llms.txt
> Use this file to discover all available pages before exploring further.

# Installation

> Install the Law4Devs Python SDK and make your first API call.

## Requirements

* Python 3.9 or later
* No runtime dependencies — the SDK uses only the Python standard library (`urllib`)

## Install

```bash theme={null}
pip install law4devs
```

To pin to a specific version:

```bash theme={null}
pip install law4devs==1.0.0
```

## First Call

```python theme={null}
import os
from law4devs import Law4DevsClient

client = Law4DevsClient(api_key=os.environ["LAW4DEVS_API_KEY"])
page = client.frameworks.list()
print(page.data[0].name)  # e.g. "Cyber Resilience Act"
```

## Configuration

```python theme={null}
import os
from law4devs import Law4DevsClient

client = Law4DevsClient(
    api_key=os.environ["LAW4DEVS_API_KEY"],
    base_url="https://api.law4devs.eu/v1",  # default
    timeout=30,    # seconds, default 30
    max_retries=3, # retries on 429/5xx, default 3
)
```

| Option        | Type  | Default        | Description                  |
| ------------- | ----- | -------------- | ---------------------------- |
| `api_key`     | `str` | —              | **Required.** Your API key   |
| `base_url`    | `str` | Production URL | Override for dev environment |
| `timeout`     | `int` | `30`           | Request timeout in seconds   |
| `max_retries` | `int` | `3`            | Retries on 429/5xx           |

## Environment Variable

```bash theme={null}
export LAW4DEVS_API_KEY="your-key"
```

```python theme={null}
import os
from law4devs import Law4DevsClient

client = Law4DevsClient(api_key=os.environ["LAW4DEVS_API_KEY"])
```

<Warning>
  Never hardcode your API key in source code or commit it to version control.
</Warning>

## Verify the Install

```bash theme={null}
LAW4DEVS_API_KEY=your-key python -c "
from law4devs import Law4DevsClient
import os
c = Law4DevsClient(api_key=os.environ['LAW4DEVS_API_KEY'])
print(c.frameworks.list().meta.total, 'frameworks')
"
```
