fastapi authenticator for google cloud tasks
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
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 fastapi-authenticator-0.1.1.tar.gz.
File metadata
- Download URL: fastapi-authenticator-0.1.1.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3a4ff24b006cd7fab423f26aecf9ed4e039d995dc1fc835f0f03f4d782f8efd7
|
|
| MD5 |
b68caa3c6d9dd54e6e33bd95584c0860
|
|
| BLAKE2b-256 |
e1c207dc365e89c6c0ca7c40b6047666b30f373aa824c7e1432317f825868a5f
|
File details
Details for the file fastapi_authenticator-0.1.1-py3-none-any.whl.
File metadata
- Download URL: fastapi_authenticator-0.1.1-py3-none-any.whl
- Upload date:
- Size: 3.9 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/50.3.2 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fbad04ed4fe0e0d0553f2838ca8d2112d40fa5ca2f1bf0f9c2221a6565808e64
|
|
| MD5 |
d6f3ceb501a4a5bffa6b6983d0fd86ab
|
|
| BLAKE2b-256 |
2bcc81b61981e8c8b5e41d4bb068fa3dd31e553bbb4babb4200651ebda7b63fe
|