Initial commit: Robot ökoszisztéma v2.0 - Stabilizált jármű és szerviz robotok

This commit is contained in:
Kincses
2026-03-04 02:03:03 +01:00
commit 250f4f4b8f
7942 changed files with 449625 additions and 0 deletions

12
seed_discovery.py Executable file
View File

@@ -0,0 +1,12 @@
# seed_discovery.py
async def seed():
# Az RDW-től lekérjük az ÖSSZES egyedi márkát
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)
makes = resp.json()
async with SessionLocal() as db:
for item in makes:
m = item['merk'].upper()
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()