METADATA 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. Metadata-Version: 2.1
  2. Name: itsdangerous
  3. Version: 2.2.0
  4. Summary: Safely pass data to untrusted environments and back.
  5. Maintainer-email: Pallets <contact@palletsprojects.com>
  6. Requires-Python: >=3.8
  7. Description-Content-Type: text/markdown
  8. Classifier: Development Status :: 5 - Production/Stable
  9. Classifier: Intended Audience :: Developers
  10. Classifier: License :: OSI Approved :: BSD License
  11. Classifier: Operating System :: OS Independent
  12. Classifier: Programming Language :: Python
  13. Classifier: Typing :: Typed
  14. Project-URL: Changes, https://itsdangerous.palletsprojects.com/changes/
  15. Project-URL: Chat, https://discord.gg/pallets
  16. Project-URL: Documentation, https://itsdangerous.palletsprojects.com/
  17. Project-URL: Donate, https://palletsprojects.com/donate
  18. Project-URL: Source, https://github.com/pallets/itsdangerous/
  19. # ItsDangerous
  20. ... so better sign this
  21. Various helpers to pass data to untrusted environments and to get it
  22. back safe and sound. Data is cryptographically signed to ensure that a
  23. token has not been tampered with.
  24. It's possible to customize how data is serialized. Data is compressed as
  25. needed. A timestamp can be added and verified automatically while
  26. loading a token.
  27. ## A Simple Example
  28. Here's how you could generate a token for transmitting a user's id and
  29. name between web requests.
  30. ```python
  31. from itsdangerous import URLSafeSerializer
  32. auth_s = URLSafeSerializer("secret key", "auth")
  33. token = auth_s.dumps({"id": 5, "name": "itsdangerous"})
  34. print(token)
  35. # eyJpZCI6NSwibmFtZSI6Iml0c2Rhbmdlcm91cyJ9.6YP6T0BaO67XP--9UzTrmurXSmg
  36. data = auth_s.loads(token)
  37. print(data["name"])
  38. # itsdangerous
  39. ```
  40. ## Donate
  41. The Pallets organization develops and supports ItsDangerous and other
  42. popular packages. In order to grow the community of contributors and
  43. users, and allow the maintainers to devote more time to the projects,
  44. [please donate today][].
  45. [please donate today]: https://palletsprojects.com/donate