{"id":27535,"library":"warrant-lite","title":"Warrant Lite","description":"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+.","status":"active","version":"1.0.4","language":"python","source_language":"en","source_url":"https://github.com/capless/warrant-lite","tags":["aws","cognito","srp","authentication"],"install":[{"cmd":"pip install warrant-lite","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Required for AWS Cognito API calls (initiate_auth, respond_to_auth_challenge).","package":"boto3","optional":false},{"reason":"Used internally for configuration; may be pulled automatically.","package":"envs","optional":true}],"imports":[{"note":"The module is 'warrant_lite', not 'warrant' or the package name.","wrong":"from warrant_lite import warrant_lite","symbol":"client","correct":"from warrant_lite import client"},{"note":"Cognito class is in the client module, not top-level.","wrong":"from warrant_lite import Cognito","symbol":"WarrantLite","correct":"from warrant_lite.client import Cognito"}],"quickstart":{"code":"import os\nfrom warrant_lite.client import Cognito\n\npool_id = os.environ.get('POOL_ID', 'us-east-1_xxxxx')\nclient_id = os.environ.get('CLIENT_ID', 'xxx')\n\ncognito = Cognito(pool_id=pool_id, client_id=client_id)\n# SRP authentication requires extra steps; see docs for full flow.","lang":"python","description":"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."},"warnings":[{"fix":"Use the full Warrant library if you need higher-level features, or implement SRP yourself using the provided primitives.","message":"The 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.","severity":"gotcha","affected_versions":"all"},{"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.","message":"SRP 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.","severity":"gotcha","affected_versions":"all"},{"fix":"Consider using 'warrant' (https://pypi.org/project/warrant/) for a more complete solution.","message":"The original 'warrant-lite' package may have been superseded by 'warrant' (full) or 'cognitojwt' (token verification). Check the latest PyPI status.","severity":"deprecated","affected_versions":"1.0.4"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run: pip install warrant-lite","cause":"Installed the wrong package name ('warrant-lite' vs 'warrant_lite').","error":"ModuleNotFoundError: No module named 'warrant_lite'"},{"fix":"Use: from warrant_lite.client import Cognito","cause":"Cognito class is not exposed at the top-level __init__.py.","error":"ImportError: cannot import name 'Cognito' from 'warrant_lite'"},{"fix":"Set environment variables AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY, or configure a boto3 session before using the library.","cause":"AWS credentials not configured for boto3.","error":"botocore.exceptions.NoCredentialsError: Unable to locate credentials"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}