sendvrel-login-python
Critical Update Added: Important PKCE Security Fix. Please upgrade to the latest version immediately to maintain login functionality with Sendvrel.
Official Python SDK for Sendvrel Authentication.
🚀 Quick Start (Zero-Config)
Easily integrate Sendvrel OAuth 2.0 into your Python backends (Django, Flask, FastAPI). This package acts as a full Confidential Client, capable of handling authorization URLs, secure token exchanges, and token verification.
Installation
pip install sendvrel-login
🛠️ Usage
1. Generating the Authorization URL
Redirect your users to this URL so they can log in via Sendvrel.
from sendvrel_login import TSPClient
client = TSPClient(
client_id='YOUR_CLIENT_ID',
client_secret='YOUR_CLIENT_SECRET',
redirect_uri='http://localhost:8000/callback'
)
auth_url = client.get_authorization_url()
# Redirect your user to `auth_url`
2. Exchanging the Code for a Token
When the user returns to your redirect_uri, they will have a code in the URL parameters.
# Assuming you extracted the `code` from the URL query string
token_data = client.exchange_token(code)
if 'error' in token_data:
print("Failed to login:", token_data['error'])
else:
access_token = token_data['access_token']
print("Successfully retrieved access token!", access_token)
3. Verifying a Token / Getting the User Profile
Once you have an access token (or if you are just verifying a token sent by a React frontend), use verify_token.
from sendvrel_login import TSPAuthException
try:
data = client.verify_token(access_token)
user_profile = data['user']
print(f"Logged in as: {user_profile['email']}")
except TSPAuthException as error:
print(f"Authentication failed: {str(error)}")
Metadata
Release files for sendvrel-login 1.1.3
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 | Actions |
|---|---|---|---|---|
| sendvrel_login-1.1.3.tar.gz | 3.3 kB | Without provenance | Details for sendvrel_login-1.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sendvrel_login-1.1.3-py3-none-any.whl | Python 3 | none | any | Details for sendvrel_login-1.1.3-py3-none-any.whl |
Total release size: 8.4 kB
Release files / sendvrel_login-1.1.3.tar.gz
| Download URL | sendvrel_login-1.1.3.tar.gz |
|---|---|
| Size | 3.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a0c94330cc29f30d89deb9a27958c787a69212e53830a1c53c225a6af7dea666
|
|
BLAKE2b-256 checksum How to use checksums |
de00b888df8bcdcf96e19d87c2c117eefea8bbf4667b9b46ec20c70c19130b4e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.2
|
Release files / sendvrel_login-1.1.3-py3-none-any.whl
| Download URL | sendvrel_login-1.1.3-py3-none-any.whl |
|---|---|
| Size | 5.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6fdc2a72641e6f04d24f64213a61c37b78a2bf13beb41c9a1fca32d5567d1276
|
|
BLAKE2b-256 checksum How to use checksums |
3436cbd75031eea71de10b3d12fee585ce29d69e71c68edb8f4b34558ab37229
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.2
|
Security for sendvrel-login 1.1.3
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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.