Local Flask API for Data Intake

Job ID: 39971298

Budget: ₹1,500 – ₹12,500 INR

I already operate a browser-based recharge tool on my desktop and now want to place a lightweight Flask service beside it. The service’s single responsibility is to accept recharge requests in JSON, run a quick sanity check against a small schema, and then append each valid record to a local CSV that grows throughout the day.

The application will listen on localhost:5000, but must be prepared to sit behind a Cloudflare Tunnel so that partners can POST to it over HTTPS. With that in mind I need:

• A clean Flask endpoint (POST /recharge or similar) that enforces an API-key header, validates the JSON format and required fields, and returns clear success / error codes.
• CSV-based persistence—no database this time. When the CSV doesn’t exist it should be created automatically with the correct column order.
• Minimal configuration: port, API key, and CSV path in a .env or config file.
• Simple instructions for starting the service and exposing it through Cloudflare Tunnel (I already have a tunnel set up; just show the command and required flags).
• Brief README or inline comments explaining where to add future fields to the schema.

If you can deliver the Python source, requirements.txt, and the short how-to guide, I can plug it straight into my workflow and start accepting data the same day.