bacommontools package

Tools functionality shared by all Ballistica components.

Submodules

bacommontools.pcommands module

Pcommands for bacommontools.

bacommontools.pcommands.bacurl() None[source]

Run curl with the Ballistica API key injected.

Usage: bacurl [curl-args…] <url>

Reads ballistica_api_key from config/localconfig.json and passes it as a Bearer token in the Authorization header. All arguments are forwarded to curl. The -s (silent) flag is added automatically.

Examples:

bacurl https://dev.ballistica.net/api/v1/admin/stats/catalog
bacurl -X POST -H 'Content-Type: application/json' \
    -d '{"dry_run":true}' \
    https://dev.ballistica.net/api/v1/admin/stats/flush
bacommontools.pcommands.require_ballistica_api_key() None[source]

Verify a Ballistica API key is available; error if not.