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.
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 details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gcp-taskqueue-0.0.3.tar.gz.
File metadata
- Download URL: gcp-taskqueue-0.0.3.tar.gz
- Upload date:
- Size: 3.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dd5881b207f1e72a8b4c9f9a00d632072fe4ef174ad3262d1a7aa4929cb60bf4
|
|
| MD5 |
f8918fb1cfa699c887e13ea86af3f7da
|
|
| BLAKE2b-256 |
7b316224c7d2eb0bbec7760b47d0067a02dcfe60536814334cfd9b51e560d042
|
File details
Details for the file gcp_taskqueue-0.0.3-py3-none-any.whl.
File metadata
- Download URL: gcp_taskqueue-0.0.3-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0176126d50d1f84e500e3ed59cabb0268fd35a296cdfc7a6a68f9daa8e63b3b1
|
|
| MD5 |
d684d5c0af06d3994140f4c4cb428451
|
|
| BLAKE2b-256 |
46a9b3c18687a40cf303650f1815c4d19ae8a19f1d2ad1a73bbb4c83a499fe4e
|