FastLink
OAuth 2.0 client for various platforms, asynchronous, easy-to-use, extensible
Features
- All-in-one: Supports popular platforms like Google, Yandex, Telegram, etc.
- Asynchronous: Built on top of
httpxis fully asynchronous. - Easy-to-use: Simple and intuitive API for quick integration.
- Extensible: Easily add support for new platforms or customize existing ones.
Installation
pip install fastlink
Get Started
from typing import Annotated, Any
from fastapi import Depends, FastAPI
from fastapi.responses import RedirectResponse
from examples.config import settings
from fastlink import GoogleSSO
from fastlink.schemas import OAuth2Callback, OpenID
app = FastAPI()
sso = GoogleSSO(
settings.google_client_id,
settings.google_client_secret,
"http://localhost:8000/callback",
)
@app.get("/login")
async def login() -> RedirectResponse:
async with sso:
url = await sso.login_url()
return RedirectResponse(url=url)
@app.get("/callback")
async def callback(call: Annotated[OAuth2Callback, Depends()]) -> OpenID:
async with sso:
return await sso.callback(call)
Now you can run the server and visit http://localhost:8000/login to start the OAuth 2.0 flow.
After logging into Google, you will be redirected to the callback URL. The server will then fetch the user's OpenID
information and return it as a response.
Metadata
Release files for fastlink 0.1.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| fastlink-0.1.6.tar.gz | 12.0 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| fastlink-0.1.6-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 28.9 kB
Release files / fastlink-0.1.6.tar.gz
| Download URL | fastlink-0.1.6.tar.gz |
|---|---|
| Size | 12.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0c95a19a1042acfaf4f01d0371fd22fc291bbe323f0e320eddf6c14170d66471
|
|
BLAKE2b-256 checksum How to use checksums |
22d4bdf2cb75c123501d8bdac616bfdc24e5e931d285210aedb755423cae8229
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.3 CPython/3.12.3 Windows/11
|
Release files / fastlink-0.1.6-py3-none-any.whl
| Download URL | fastlink-0.1.6-py3-none-any.whl |
|---|---|
| Size | 16.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
77f1ceb8af24145f4dce43d24569b019305d5a76053702dc94ffdf84885fb239
|
|
BLAKE2b-256 checksum How to use checksums |
a9ce55cdc2677c050c59f23b94ea754767a48a4388825ac0171193febe8efcaf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.3 CPython/3.12.3 Windows/11
|
Security for fastlink 0.1.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.