An asynchronous Python client for interacting with Google Cloud Task Queue. This library is part of the `gcloud-aio` ecosystem, providing idiomatic `asyncio` support for various Google Cloud services. As an independent sub-package, its releases are decoupled from other `gcloud-aio` components, and it's currently at version 7.0.0.
pip install gcloud-aio-taskqueueVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to initialize the `TaskQueueClient`, authenticate using environment variables or service account paths, and perform common operations like adding, retrieving, and deleting tasks. It highlights the use of `gcloud_aio_core.session.Session` for proper async context management and necessary parameters for `add_task` after recent breaking changes.
Update your code to expect and handle the returned `Task` object, accessing its `name` or `id` attributes directly. Previously, you would not get a direct return value from `add_task`.
Replace `payload=my_data` with `body=my_data`. Also, `payload_type` is now a mandatory parameter specifying the content type of the body.
Import `HttpMethod` from `gcloud_aio_taskqueue.types` and use it (e.g., `method=HttpMethod.POST`) instead of string literals (e.g., `method='POST'`).
Update your imports from `from gcloud_aio_taskqueue import Client` to `from gcloud_aio_taskqueue import TaskQueueClient`.
Ensure your client instantiation and usage is wrapped in an `async with Session(...) as session:` block to properly handle resource cleanup and avoid connection leaks.