Skip to main content

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)
)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gcloud-tasks-emulator-0.0.0.dev0.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file gcloud-tasks-emulator-0.0.0.dev0.tar.gz.

File metadata

  • Download URL: gcloud-tasks-emulator-0.0.0.dev0.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.4

File hashes

Hashes for gcloud-tasks-emulator-0.0.0.dev0.tar.gz
Algorithm Hash digest
SHA256 c267e12bdd661f3554575dc6731ab48300fb996b340aecebd5940e38d8d02c49
MD5 7f6986ece1876b4112444a889c5102d6
BLAKE2b-256 478f1db996f72e71dc2edda9e4060294b16c3a24cd505a6195ec3314e7e178b1

See more details on using hashes here.

File details

Details for the file gcloud_tasks_emulator-0.0.0.dev0-py3-none-any.whl.

File metadata

  • Download URL: gcloud_tasks_emulator-0.0.0.dev0-py3-none-any.whl
  • Upload date:
  • Size: 8.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.4

File hashes

Hashes for gcloud_tasks_emulator-0.0.0.dev0-py3-none-any.whl
Algorithm Hash digest
SHA256 3127f0dacf375878d2c9cb3e916f529ddaa8af6a2962548931c1ab24ba801ceb
MD5 01099a298d753dafba17979910f34d20
BLAKE2b-256 70fe9719072117e216143fe3441bb7a3da7bc1c75cf7fd99962e8f296af6c152

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page