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.
Metadata
Release files for fastapi-authenticator 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| fastapi-authenticator-0.1.1.tar.gz | 3.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| fastapi_authenticator-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.2 kB
Release files / fastapi-authenticator-0.1.1.tar.gz
| Download URL | fastapi-authenticator-0.1.1.tar.gz |
|---|---|
| Size | 3.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3a4ff24b006cd7fab423f26aecf9ed4e039d995dc1fc835f0f03f4d782f8efd7
|
|
BLAKE2b-256 checksum How to use checksums |
e1c207dc365e89c6c0ca7c40b6047666b30f373aa824c7e1432317f825868a5f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Release files / fastapi_authenticator-0.1.1-py3-none-any.whl
| Download URL | fastapi_authenticator-0.1.1-py3-none-any.whl |
|---|---|
| Size | 3.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fbad04ed4fe0e0d0553f2838ca8d2112d40fa5ca2f1bf0f9c2221a6565808e64
|
|
BLAKE2b-256 checksum How to use checksums |
2bcc81b61981e8c8b5e41d4bb068fa3dd31e553bbb4babb4200651ebda7b63fe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|