feat: v1.7 overhaul - identity hash, triple wallet, financial ledger, and security audit system

This commit is contained in:
2026-02-16 00:42:49 +00:00
parent bb02d4ed59
commit d574d3297d
63 changed files with 3710 additions and 565 deletions

32
backend/seed_discovery.py Normal file
View File

@@ -0,0 +1,32 @@
import asyncio
import httpx
from sqlalchemy import text
from app.db.session import SessionLocal
async def seed():
print("🚀 RDW Márka-felfedezés indul...")
url = "https://opendata.rdw.nl/resource/m9d7-ebf2.json?$select=distinct%20merk&$limit=50000"
async with httpx.AsyncClient() as client:
resp = await client.get(url, timeout=60)
if resp.status_code != 200:
print(f"❌ Hiba: {resp.status_code}")
return
makes = resp.json()
print(f"📦 {len(makes)} márkát találtam. Mentés...")
async with SessionLocal() as db:
for item in makes:
m = item['merk'].upper()
# ON CONFLICT: Ha már benne van (pl. n8n betette), ne legyen hiba
await db.execute(text("""
INSERT INTO data.catalog_discovery (make, model, source, status)
VALUES (:m, 'ALL', 'global_seed', 'pending')
ON CONFLICT DO NOTHING
"""), {"m": m})
await db.commit()
print("✅ Kész! A discovery tábla felöltve az összes EU-s márkával.")
if __name__ == "__main__":
asyncio.run(seed())