Skip to main content

Generate TTL based self expiring crumbs (token).

Project description

Generate TTL based self expiring crumbs (token).


` pip install --upgrade `

` >>> from crumb import Crumb >>> >>> # generate crumb for user that expires in 30 seconds >>> c = Crumb('', 30, secret='!@#$') >>> c.generate() 830b60fe77b2 >>> >>> # key attribute also contains the generated crumb >>> print c.key 830b60fe77b2 >>> >>> # verify the generated crumb >>> c = Crumb('', 30, secret='!@#$', key='830b60fe77b2') >>> c.validate() True >>> >>> # try to verify again after 60 sec >>> c.validate() False `

Project details

Release history Release notifications

This version
History Node


History Node


History Node


History Node


History Node


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date (3.4 kB) Copy SHA256 hash SHA256 Source None Apr 29, 2014

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page