nexus-vylth
Nexus SDK for Python — auth verification and mail API for VYLTH services.
Install
# Mail only
pip install nexus-vylth
# Mail + Auth (JWT verification)
pip install nexus-vylth[auth]
# Everything
pip install nexus-vylth[all]
Mail API
Send emails via your Nexus Mail API key (nm_...):
from nexus_vylth import NexusMail
mail = NexusMail("nm_your_key_here")
# Single send
result = mail.send(
to="user@example.com",
subject="Hello",
body_text="Hi there!",
)
print(result.from_address) # you@vylth.com
# Batch send
results = mail.send_batch(
recipients=["alice@example.com", "bob@example.com"],
subject="Newsletter",
body_html="<h1>Monthly Update</h1><p>Here's what happened...</p>",
)
Auth (JWT Verification)
Verify Nexus access tokens using JWKS (auto-fetched and cached):
from nexus_vylth import NexusAuth
auth = NexusAuth()
claims = auth.verify(token)
print(claims.email) # user@vylth.com
print(claims.global_role) # executor
print(claims.has_role("commander")) # True
FastAPI
from fastapi import FastAPI, Depends
from nexus_vylth import NexusAuth
app = FastAPI()
auth = NexusAuth()
@app.get("/profile")
async def profile(claims=Depends(auth.fastapi_dependency())):
return {"email": claims.email, "role": claims.global_role}
@app.get("/admin")
async def admin(claims=Depends(auth.fastapi_dependency("commander"))):
return {"admin": claims.username}
Flask
from flask import Flask, g, jsonify
from nexus_vylth import NexusAuth
app = Flask(__name__)
auth = NexusAuth()
@app.route("/profile")
@auth.flask_decorator()
def profile():
return jsonify({"email": g.nexus_claims.email})
@app.route("/admin")
@auth.flask_decorator("commander")
def admin():
return jsonify({"admin": g.nexus_claims.username})
Claims Fields
| Field | Type | Description |
|---|---|---|
sub |
str | Account ID |
email |
str | Primary email |
username |
str | Username |
avatar |
str | Avatar URL |
global_role |
str | Global role (citizen/pioneer/navigator/commander/executor) |
email_verified |
bool | Whether email is verified |
affiliate_code |
str | Referral code |
app_roles |
dict | Per-app role overrides |
two_factor_verified |
bool | Whether 2FA was verified this session |
Metadata
Release files for nexus-vylth 1.0.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 | Provenance | |
|---|---|---|---|---|
| nexus_vylth-1.0.1.tar.gz | 7.0 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| nexus_vylth-1.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 14.0 kB
Release files / nexus_vylth-1.0.1.tar.gz
| Download URL | nexus_vylth-1.0.1.tar.gz |
|---|---|
| Size | 7.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0e59e58619cc05d7a39288d7e697cd06068f096341b43d7c02d6accff641b092
|
|
BLAKE2b-256 checksum How to use checksums |
bed5f22cb49c59bf9923c240b01c7694b22963e5a1821fbb5aee8011388b04d5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / nexus_vylth-1.0.1-py3-none-any.whl
| Download URL | nexus_vylth-1.0.1-py3-none-any.whl |
|---|---|
| Size | 7.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3f48659c3ff8985b0e6c6dd2e22cb01b894afdb69e7577efcd876b3505435562
|
|
BLAKE2b-256 checksum How to use checksums |
a2db5af3b1ee7220378dc3f2d9e0106ab545858a50258c2e4f7ee5c610f37046
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Security for nexus-vylth 1.0.1
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.