Cloudflare & RapidAPI FX Pipeline

Заказчик: AI | Опубликовано: 30.12.2025

I want a complete, low-cost workflow that fetches the daily Romanian National Bank XML (https://www.bnr.ro/nbrfxrates.xml), stores each record in PostgreSQL, and exposes the history through a Cloudflare-hosted FastAPI service that RapidAPI subscribers can query in JSON. What I need you to build • A Cloudflare Worker or Pages Function written in Python that runs once every 24 hours, parses the XML, and inserts or upserts the data into PostgreSQL. • A FastAPI app—also on Cloudflare—that exposes endpoints like /rates?date=YYYY-MM-DD /rates?currency=EUR&from=YYYY-MM-DD and always responds in clean JSON. • RapidAPI configuration so those endpoints appear as a live, documented API there; keys, quota and analytics must work. • A Bash-based CI/CD script (.sh) suitable for Ubuntu 24.04 LTS that pulls the GitHub repo, runs tests, and deploys automatically to Cloudflare and RapidAPI. Deliverables 1. GitHub repo with readable, commented Python source, requirements.txt or pyproject.toml, and the CI/CD script. 2. Cloudflare and RapidAPI dashboards showing the service live. 3. A short README explaining environment variables (DB creds, tokens), setup steps and how to adjust the scheduled time if I ever need to. Acceptance I will run the script on my own Ubuntu box, see the worker deploy, verify new rates appear in PostgreSQL the next day, and successfully call the JSON endpoints through RapidAPI. If everything works, the job is done.