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.
Prerequisites
Install the SDK first:
Then create a client:
from law4devs import Law4DevsClient
client = Law4DevsClient()
List All Frameworks
Fetch the first page of available EU regulatory frameworks:
from law4devs import Law4DevsClient
client = Law4DevsClient()
page = client.frameworks.list()
print(f"Total frameworks: {page.meta.total}")
for fw in page.data:
print(f" {fw.slug}: {fw.name} ({fw.article_count} articles)")
Example output:
Total frameworks: 19
gdpr: General Data Protection Regulation (99 articles)
cra: Cyber Resilience Act (71 articles)
nis2: Network and Information Security Directive 2 (46 articles)
...
Iterate All CRA Articles
Use iter() to walk every article without managing pagination yourself:
for article in client.articles.iter("cra"):
print(f"Art. {article.article_number}: {article.title}")
iter() automatically fetches subsequent pages until the list is exhausted.
Fetch a Single Article
article = client.articles.get("gdpr", 17)
print(article.title)
# "Right to erasure ('right to be forgotten')"
for para in article.paragraphs:
print(f" §{para.paragraph_number}: {para.content[:80]}...")
Search Across All Frameworks
results = client.search.query("data breach notification", framework="gdpr")
for r in results.data:
print(r.match_context)
Narrow by result type:
results = client.search.query("incident response", result_type="article")
Get Compliance Requirements
Pull every GDPR requirement and print its type:
for req in client.requirements.iter(framework_slug="gdpr"):
print(f"[{req.requirement_type}] Art. {req.article_number} — {req.requirement_text[:60]}...")
Get Compliance Deadlines
for deadline in client.compliance.iter_deadlines(framework_slug="nis2"):
print(f"{deadline.deadline_date}: {deadline.description}")
Next Steps