pump-gcp-radar
Extra commands for gcp-radar, added through
its plugin hook (gcp_radar.commands entry points, gcp-radar 1.3.0+). The main
addition is a one-command push of your GCP inventory and billing CSVs to Pump's
self-serve onboarding endpoint — no standing cross-account access required.
Everything in gcp-radar (inventory, billing, diagram, run, ...) works
unchanged. The Pump push is pump-report --upload-token.
Install
pip install pump-gcp-radar
Usage
pump-gcp-radar runs the normal gcp-radar CLI with this package's commands added:
pump-gcp-radar --help # built-in and pump commands together
pump-gcp-radar run --project my-proj # gcp-radar built-in
pump-gcp-radar pump-report --project my-proj # resource counts per service (+ Pump upload)
Pump onboarding
In the Pump app, mint an upload token. Pump shows you a ready-to-paste command.
Run it against the GCP project you want to onboard:
pump-gcp-radar run --project my-proj \
--billing-table my-proj.billing_ds.gcp_billing_export_v1_XXXXXX \
--upload-token <TOKEN>
This inventories the project read-only, queries the billing export, writes
inventory.csv and billing.csv locally, and uploads both straight to Pump.
Both use gcp-radar's one-shot format (a RecordType column on every row):
inventory.csv holds Inventory and Commitment (CUD) rows; billing.csv
holds DailyCost, MonthlyCost, SkuCost and Credit rows.
Pump detects both files, runs its analysis, and surfaces the findings in the app.
--billing-tablecan also come from$GCP_RADAR_BILLING_TABLE. Without it, only the inventory is uploaded.--billing-dayssets the billing window (default 90).--output/--billing-outputchange the CSV paths (defaultsinventory.csv,billing.csv).
What leaves your machine
Only the two CSVs. The token carries no GCP credentials and no company id — Pump binds the company and derives the S3 key server-side, so a token can only ever write its own upload's prefix. Each file goes to S3 through a short-lived presigned PUT URL that Pump mints on demand.
Pointing at a non-prod backend
The token exchange defaults to https://api.pump.co. Override it for local testing:
pump-gcp-radar pump-report --project my-proj --upload-token <TOKEN> --api-base http://localhost:8001
# or
PUMP_API_BASE=http://localhost:8001 pump-gcp-radar pump-report --project my-proj --upload-token <TOKEN>
How the push works
pump_gcp_radar/upload.py:
- For each role (
inventory,billing), POSTs{api_base}/api/v1/estimate/radar/urlswith{"token", "role"}and receives a presigned S3 PUT URL. - PUTs the corresponding CSV with
Content-Type: text/csv(the presigned URL signs the content-type, so it must match).
Adding a command
-
Add a
register(subparsers)function insrc/pump_gcp_radar/commands.py(add a subparser andset_defaults(func=handler)). -
Register it in
pyproject.toml:[project.entry-points."gcp_radar.commands"] my-command = "pump_gcp_radar.commands:register_my_command"
-
Reinstall (
pip install -e .) so the entry point is picked up.
Command names can't clash with gcp-radar's built-ins (inventory, commitments,
billing, diagram, run); clashing plugins are skipped with a warning.
Relationship to upstream
This package builds on gcp-radar (MIT). The scanning and billing code is upstream's; the Pump push is this package's addition.
Development
pip install -e ".[dev]"
pytest
Metadata
Release files for pump-gcp-radar 0.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pump_gcp_radar-0.2.2.tar.gz | 7.9 kB | Without provenance | Details for pump_gcp_radar-0.2.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pump_gcp_radar-0.2.2-py3-none-any.whl | Python 3 | none | any | Details for pump_gcp_radar-0.2.2-py3-none-any.whl |
Total release size: 15.7 kB
Release files / pump_gcp_radar-0.2.2.tar.gz
| Download URL | pump_gcp_radar-0.2.2.tar.gz |
|---|---|
| Size | 7.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
82aeaaeb8287951dc0b94f75460216885de96b41f6aa0cec87760e916172c8a3
|
|
BLAKE2b-256 checksum How to use checksums |
8ca49976632b83cfe0a391fbf0e9a3418b1b969965b93834e80d4fd164deaeac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.15
|
Release files / pump_gcp_radar-0.2.2-py3-none-any.whl
| Download URL | pump_gcp_radar-0.2.2-py3-none-any.whl |
|---|---|
| Size | 7.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ef2b2975e4fe2243ee56a4ac3a52bd1ced110cf1ea3f4f0ff1465ebaa8a37f2e
|
|
BLAKE2b-256 checksum How to use checksums |
e89353b8bb3eddc968db6e733f3bc15d1f764e1d4b5108c3463619cd01c05837
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.15
|
Security for pump-gcp-radar 0.2.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.