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
Close
Hashes for fastapi-authenticator-0.1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3a4ff24b006cd7fab423f26aecf9ed4e039d995dc1fc835f0f03f4d782f8efd7 |
|
MD5 | b68caa3c6d9dd54e6e33bd95584c0860 |
|
BLAKE2b-256 | e1c207dc365e89c6c0ca7c40b6047666b30f373aa824c7e1432317f825868a5f |
Close
Hashes for fastapi_authenticator-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fbad04ed4fe0e0d0553f2838ca8d2112d40fa5ca2f1bf0f9c2221a6565808e64 |
|
MD5 | d6f3ceb501a4a5bffa6b6983d0fd86ab |
|
BLAKE2b-256 | 2bcc81b61981e8c8b5e41d4bb068fa3dd31e553bbb4babb4200651ebda7b63fe |