Registry / aws / warrant-lite

warrant-lite

JSON →
library1.0.4pypypi✓ verified 80d ago

A lightweight Python library for processing SRP (Secure Remote Password) requests for AWS Cognito User Pools. Extracted from the Warrant library, it provides only the low-level SRP authentication logic without the higher-level helpers. Current version 1.0.4 supports Python 3.6+.

pip install warrant-lite
INSTALL
IMPORT
SIG · WARRANT-LITE
W
warrant-lite
awspythonv1.0.4
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

WarrantLite
from warrant_lite import WarrantLite
from warrant_lite import client

Initialize Cognito client with pool and client IDs. The library only handles SRP; higher-level auth (e.g., initiate_auth with AWS credentials) is not included.

import os from warrant_lite.client import Cognito pool_id = os.environ.get('POOL_ID', 'us-east-1_xxxxx') client_id = os.environ.get('CLIENT_ID', 'xxx') cognito = Cognito(pool_id=pool_id, client_id=client_id) # SRP authentication requires extra steps; see docs for full flow.
Debug
Known issues
gotchaThe library is intentionally minimal: it does NOT provide methods for token refresh, user management, or AWS Cognito admin APIs. There is no 'authenticate()' convenience method; you must implement the SRP protocol steps manually.
fix
Use the full Warrant library if you need higher-level features, or implement SRP yourself using the provided primitives.
affects: all
gotchaSRP authentication requires an authenticated boto3 session. You must set up AWS credentials (via environment variables, IAM role, or boto3 session) before using Cognito methods that call AWS APIs.
fix
Ensure boto3 has valid credentials: either set AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY, or configure a boto3 session before creating Cognito.
affects: all
deprecatedThe original 'warrant-lite' package may have been superseded by 'warrant' (full) or 'cognitojwt' (token verification). Check the latest PyPI status.
fix
Consider using 'warrant' (https://pypi.org/project/warrant/) for a more complete solution.
affects: 1.0.4
Upgrade
Version history
1.0.4latest on PyPI · released May 21, 2019
Audit
Dependencies
boto3requiredRequired for AWS Cognito API calls (initiate_auth, respond_to_auth_challenge).
envsoptionalUsed internally for configuration; may be pulled automatically.
Agent activity
38 hits · last 30 days
node
34
OpenAI (training)
1
Resources
warrant-lite — pip install warrant-lite · libregistry