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.
Requirements
- Python 3.9 or later
- No runtime dependencies — the SDK uses only the Python standard library (
urllib)
Install
To pin to a specific version:
pip install law4devs==1.0.0
First Call
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
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
export LAW4DEVS_API_KEY="your-key"
import os
from law4devs import Law4DevsClient
client = Law4DevsClient(api_key=os.environ["LAW4DEVS_API_KEY"])
Never hardcode your API key in source code or commit it to version control.
Verify the Install
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')
"