A stub emulator for the Google Cloud Tasks API
Project description
Local Emulator for Google Cloud Tasks
Google doesn't (yet) ship an emulator for the Cloud Tasks API like they do for Cloud Datastore.
This is a stub emulator so you can run your tests and do local development without having to connect to the production Tasks API.
THIS IS A WORK IN PROGRESS NOT ALL API CALLS ARE COMPLETE
Usage
Start the emulator with:
gcloud-tasks-emulator start --port=9090
Then from within your code, use the following (instead of your normal production client connection)
from google.cloud.tasks_v2 import CloudTasksClient
from google.cloud.tasks_v2.gapic.transports.cloud_tasks_grpc_transport import CloudTasksGrpcTransport
from google.api_core.client_options import ClientOptions
client = CloudTasksClient(
transport=CloudTasksGrpcTransport(channel=grpc.insecure_channel("127.0.0.1:%s" % port)),
client_options=ClientOptions(api_endpoint="127.0.0.1:%s" % port)
)
The 'default' queue
By default, the emulator won't create a 'default' queue, however you can enable this by passing the fully-qualified name of the queue:
gcloud-tasks-emulator start --default-queue=projects/[PROJECT]/locations/[LOCATION]/queues/default
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for gcloud-tasks-emulator-0.3.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | eabfb4267a20670ac3f1fc3b5fb328b07d6564892a477522eeade4a2eebf991b |
|
MD5 | 33524b98b88a73487f3cc792565e21b1 |
|
BLAKE2b-256 | a1815f5f0d6991c5c694117b3eda2378aed98f5487b25f4beb59613740016470 |
Close
Hashes for gcloud_tasks_emulator-0.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 607a136d873815a511ee5ef076f798159ad40b6e537c6a6cc7b39f19d13c6305 |
|
MD5 | 20ada02be381b43540a5d66c17f605ce |
|
BLAKE2b-256 | 4cad2399760a780da30b56f41a70f0f72bd2b2fdcb386845d0306870ff3a7d5b |