google cloud task queue
Project description
fastapi-authenticator
fastapi authenticator for google cloud tasks
Installation
server:
pip3 install fastapi-authenticator
client:
pip3 install gcp-taskqueue
Usage
server:
from fastapi import Depends, FastAPI
from fastapi_authenticator import GoogleCloudTask, google_cloud_task, google_cloud_auth
app = FastAPI()
@app.post("/task1")
def task_handler(
claims: dict = Depends(google_cloud_auth),
task: GoogleCloudTask: Depends(google_cloud_task)
):
...
client:
from gcp_taskqueue import TaskQueue
queue = TaskQueue(queue_id="your-queue-name")
queue.create_http_task("https://url", deadline=300)
Deployment
Service Account User
Role is needed for the client to generate oidc token.
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
gcp-taskqueue-0.0.3.tar.gz
(3.4 kB
view hashes)
Built Distribution
Close
Hashes for gcp_taskqueue-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0176126d50d1f84e500e3ed59cabb0268fd35a296cdfc7a6a68f9daa8e63b3b1 |
|
MD5 | d684d5c0af06d3994140f4c4cb428451 |
|
BLAKE2b-256 | 46a9b3c18687a40cf303650f1815c4d19ae8a19f1d2ad1a73bbb4c83a499fe4e |