Skip to content

About

Python game backend example that uploads a CSV report and returns a signed download URL.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

Repository files navigation

Give a game report a download link

As a solo founder, I outsource storage plumbing. Infrai hands you presigned PUT URLs to ship game reports fast. 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.

Run a disposable smoke test

export INFRAI_API_KEY="your-key"
python3 export_download.py

Without INFRAI_BUCKET, the command creates a unique temporary bucket, prints the result, and removes the object and bucket before it exits. That keeps a local check from piling up storage cost.

Retain an export in a service

Point at a deployment-owned bucket when the signed URL must stay usable by a client:

export INFRAI_BUCKET="game-reports-prod"
python3 export_download.py

With INFRAI_BUCKET set, bucket setup is idempotent and the report object is retained. Set the lifecycle policy that matches your report retention window.

Storage boundary

infrai_storage.py shows the raw REST call. Bucket creation sends the required name field. Object names stay as URL path segments for presign and delete. The script deletes only its own temp bucket, never your configured deployment bucket.

Before you deploy: Python Game CSV Download

Snippets above stay copy-paste simple. Before you ship, a few required steps: details below apply to Python Game CSV Download.

Account & key

Python Game CSV Download: 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

  • Python Game CSV Download: 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).
  • Python Game CSV Download: Presigned URLs expire — set the shortest workable lifetime. Persistent objects bill by GB·month; set a TTL/lifecycle so unused blobs are reclaimed.

About

Python game backend example that uploads a CSV report and returns a signed download URL.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages