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.1.0.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

gcloud_tasks_emulator-0.1.0-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

Details for the file gcloud-tasks-emulator-0.1.0.tar.gz.

File metadata

  • Download URL: gcloud-tasks-emulator-0.1.0.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/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for gcloud-tasks-emulator-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a807bc1aced30482e96cf723e7a4858db2dd68e73d5f014f1c473dbdbb6833ca
MD5 120d0d81153e28762df59500e080b940
BLAKE2b-256 80e9fa8a14d37b41752d5f8553b31874de4823446e39417640be856d94a7b135

See more details on using hashes here.

File details

Details for the file gcloud_tasks_emulator-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: gcloud_tasks_emulator-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.4 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/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for gcloud_tasks_emulator-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 42fff4d92b1ce3fb38f667caf63254e61bb2b3ab033b31dd238e573a50e52506
MD5 5d2cf5bb37c4cb6bc977c11133ed9dd0
BLAKE2b-256 cfbe4d87ee4e095f042e3e258eec1bcfbd83204d485220a6343ede7cbc8b59fc

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