pounce/backend/scripts/seed_yield_partners.py
yves.gugger 1705b5cc6e
Some checks failed
CI / Frontend Lint & Type Check (push) Has been cancelled
CI / Frontend Build (push) Has been cancelled
CI / Backend Lint (push) Has been cancelled
CI / Backend Tests (push) Has been cancelled
CI / Docker Build (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
Deploy / Build & Push Images (push) Has been cancelled
Deploy / Deploy to Server (push) Has been cancelled
Deploy / Notify (push) Has been cancelled
feat: complete Yield feature setup
Backend:
- Add yield_webhooks.py for partner callbacks (generic, Awin, batch import)
- Add yield_routing.py for domain traffic routing with landing pages
- Add DB migrations for yield table indexes
- Add seed script with 30+ Swiss/German affiliate partners
- Register all new routers in API

Frontend:
- Add public /yield landing page with live analyzer demo
- Add Yield to header navigation

Documentation:
- Complete YIELD_SETUP.md with setup guide, API reference, and troubleshooting
2025-12-12 14:52:49 +01:00

34 lines
764 B
Python

#!/usr/bin/env python3
"""
CLI script to seed yield affiliate partners.
Run from project root:
python -m scripts.seed_yield_partners
Or with poetry/venv:
cd backend && python scripts/seed_yield_partners.py
"""
import asyncio
import sys
import os
# Add parent directory to path for imports
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from app.database import AsyncSessionLocal
from app.seeds.yield_partners import seed_partners
async def main():
print("🌱 Seeding Yield affiliate partners...")
async with AsyncSessionLocal() as db:
count = await seed_partners(db)
print(f"✅ Successfully seeded {count} affiliate partners")
if __name__ == "__main__":
asyncio.run(main())