• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

docs/H18-May-2021-640444

requirements/H03-May-2022-

src/H18-May-2021-1,4391,065

tests/test_itsdangerous/H18-May-2021-624463

CHANGES.rstH A D18-May-20216.4 KiB234156

LICENSE.rstH A D15-Apr-20201.4 KiB2923

MANIFEST.inH A D24-Feb-2021159 98

PKG-INFOH A D18-May-20213.4 KiB9570

README.rstH A D24-Feb-20211.8 KiB6945

setup.cfgH A D18-May-20212 KiB8978

setup.pyH A D15-Apr-202057 42

tox.iniH A D08-Feb-2021525 2520

README.rst

1ItsDangerous
2============
3
4... so better sign this
5
6Various helpers to pass data to untrusted environments and to get it
7back safe and sound. Data is cryptographically signed to ensure that a
8token has not been tampered with.
9
10It's possible to customize how data is serialized. Data is compressed as
11needed. A timestamp can be added and verified automatically while
12loading a token.
13
14
15Installing
16----------
17
18Install and update using `pip`_:
19
20.. code-block:: text
21
22    pip install -U itsdangerous
23
24.. _pip: https://pip.pypa.io/en/stable/quickstart/
25
26
27A Simple Example
28----------------
29
30Here's how you could generate a token for transmitting a user's id and
31name between web requests.
32
33.. code-block:: python
34
35    from itsdangerous import URLSafeSerializer
36    auth_s = URLSafeSerializer("secret key", "auth")
37    token = auth_s.dumps({"id": 5, "name": "itsdangerous"})
38
39    print(token)
40    # eyJpZCI6NSwibmFtZSI6Iml0c2Rhbmdlcm91cyJ9.6YP6T0BaO67XP--9UzTrmurXSmg
41
42    data = auth_s.loads(token)
43    print(data["name"])
44    # itsdangerous
45
46
47Donate
48------
49
50The Pallets organization develops and supports ItsDangerous and other
51popular packages. In order to grow the community of contributors and
52users, and allow the maintainers to devote more time to the projects,
53`please donate today`_.
54
55.. _please donate today: https://palletsprojects.com/donate
56
57
58Links
59-----
60
61-   Documentation: https://itsdangerous.palletsprojects.com/
62-   Changes: https://itsdangerous.palletsprojects.com/changes/
63-   PyPI Releases: https://pypi.org/project/ItsDangerous/
64-   Source Code: https://github.com/pallets/itsdangerous/
65-   Issue Tracker: https://github.com/pallets/itsdnagerous/issues/
66-   Website: https://palletsprojects.com/p/itsdangerous/
67-   Twitter: https://twitter.com/PalletsTeam
68-   Chat: https://discord.gg/pallets
69