Registry / gcp / pybatchexecute

pybatchexecute

JSON →
library1.0.0pypypi✓ verified 85d ago

A library to ease interactions with Google's batchexecute batch RPC system. Version 1.0.0, released infrequently. Provides a high-level client for constructing and executing batched requests.

pip install pybatchexecute
INSTALL
IMPORT
SIG · PYBATCHEXECUTE
P
pybatchexecute
gcppythonv1.0.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

PreparedBatchExecute
from pybatchexecute import PreparedBatchExecute
from pybatchexecute import BatchExecuteClient
decode
from pybatchexecute import decode
encode
from pybatchexecute import encode

Initialize client and execute batch requests.

from pybatchexecute import BatchExecuteClient import os api_key = os.environ.get('API_KEY', '') client = BatchExecuteClient(api_key=api_key) # Example: execute a list of requests requests = [{'method': 'GET', 'url': 'https://example.com/api/endpoint1'}) responses = client.execute(requests) for resp in responses: print(resp.json())
Debug
Known issues
gotchaThe library does not handle authentication by default. You must pass credentials on initialization or use the `auth` parameter.
fix
Ensure you provide an authentication object or API key when creating the client.
affects: all
deprecatedThe `execute_batch` method is deprecated in favor of `execute`.
fix
Use client.execute() instead of client.execute_batch().
affects: >=1.0.0
gotchaRequests are executed in order, but responses may not correspond 1:1 if an error occurs in the middle.
fix
Always check response status codes for each request.
affects: all
Upgrade
Version history
1.0.0latest on PyPI · released Apr 10, 2023
Audit
Dependencies
requestsrequiredUsed for HTTP communication
google-authoptionalFor authentication (if needed)
Agent activity
25 hits · last 30 days
node
20
OpenAI (training)
1
Resources
pybatchexecute — pip install pybatchexecute · libregistry