Fastokens is a Python library for generating secure, time-limited tokens using cryptographic hashing and HMAC. It provides simple APIs for creating and verifying tokens with expiration, suitable for password reset links, API tokens, and one-time codes. Current version 0.2.0, released as an alpha. Release cadence is irregular.
pip install fastokensNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Initialize TokenManager with a secret and TTL, create a token from a dict, then verify it.
Replace 'Token' with 'TokenManager' in imports and instantiation.
Ensure secret is at least 32 characters long, or use a secret generated by os.urandom(32).
Always wrap non-dict values in a dict, e.g., create(data={'value': 'some_string'}).No dependency data recorded yet.