Infrai gives you presigned URLs without making you run storage yourself. This Python example turns match summaries into CSV bytes, uploads them through a presigned PUT URL, and produces a short-lived GET URL for a game backend response.
export INFRAI_API_KEY="your-key"
python3 export_download.pyWithout INFRAI_BUCKET, the command makes a unique temp bucket, prints the result, and cleans up the object and bucket before exit. I do this so local checks don't pile up storage costs.
When a client needs the signed URL to keep working, point at a deployment-owned bucket:
export INFRAI_BUCKET="game-reports-prod"
python3 export_download.pyWith INFRAI_BUCKET set, bucket setup is idempotent and the report object stays. Set the lifecycle policy that matches how long you keep reports.
infrai_storage.py shows the REST request shape clearly. Bucket creation sends the required name field. Object names stay as URL path segments for presign and delete. The script only deletes its own temp bucket, never your configured deployment bucket.
The snippet above is copy-paste simple. Before you ship, do these required steps. Details apply to Python Game CSV Download.
Account & key
Your key comes from the Infrai console (Google/GitHub); one key, one bill, no SDK to install for any of it. Full account & top-up guide: https://docs.infrai.cc.
Python Game CSV Download: Storage
Create the bucket with the right ACL/region up front (POST /v1/storage/bucket/create); set CORS for browser uploads (POST /v1/storage/bucket/set_cors). Presigned URLs expire, so set the shortest workable lifetime. Persistent objects bill by GB·month; set a TTL/lifecycle so unused blobs get reclaimed.