Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fastapi-authenticator-0.1.1.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

fastapi_authenticator-0.1.1-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

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

Hashes for fastapi-authenticator-0.1.1.tar.gz
Algorithm Hash digest
SHA256 3a4ff24b006cd7fab423f26aecf9ed4e039d995dc1fc835f0f03f4d782f8efd7
MD5 b68caa3c6d9dd54e6e33bd95584c0860
BLAKE2b-256 e1c207dc365e89c6c0ca7c40b6047666b30f373aa824c7e1432317f825868a5f

See more details on using hashes here.

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

Hashes for fastapi_authenticator-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fbad04ed4fe0e0d0553f2838ca8d2112d40fa5ca2f1bf0f9c2221a6565808e64
MD5 d6f3ceb501a4a5bffa6b6983d0fd86ab
BLAKE2b-256 2bcc81b61981e8c8b5e41d4bb068fa3dd31e553bbb4babb4200651ebda7b63fe

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page