itsdangerous 2.1.0
pip install itsdangerous==2.1.0
Released:
Safely pass data to untrusted environments and back.
Navigation
Unverified details
These details have not been verified by PyPIProject links
Meta
- License: BSD License (BSD-3-Clause)
- Author: Armin Ronacher
- Maintainer: Pallets
- Requires: Python >=3.7
Classifiers
- Development Status
- Intended Audience
- License
- Operating System
- Programming Language
Project description
… so better sign this
Various helpers to pass data to untrusted environments and to get it back safe and sound. Data is cryptographically signed to ensure that a token has not been tampered with.
It’s possible to customize how data is serialized. Data is compressed as needed. A timestamp can be added and verified automatically while loading a token.
Installing
Install and update using pip:
pip install -U itsdangerous
A Simple Example
Here’s how you could generate a token for transmitting a user’s id and name between web requests.
from itsdangerous import URLSafeSerializer
auth_s = URLSafeSerializer("secret key", "auth")
token = auth_s.dumps({"id": 5, "name": "itsdangerous"})
print(token)
# eyJpZCI6NSwibmFtZSI6Iml0c2Rhbmdlcm91cyJ9.6YP6T0BaO67XP--9UzTrmurXSmg
data = auth_s.loads(token)
print(data["name"])
# itsdangerous
Donate
The Pallets organization develops and supports ItsDangerous and other popular packages. In order to grow the community of contributors and users, and allow the maintainers to devote more time to the projects, please donate today.
Links
Documentation: https://itsdangerous.palletsprojects.com/
PyPI Releases: https://pypi.org/project/ItsDangerous/
Source Code: https://github.com/pallets/itsdangerous/
Issue Tracker: https://github.com/pallets/itsdangerous/issues/
Twitter: https://twitter.com/PalletsTeam
Project details
Unverified details
These details have not been verified by PyPIProject links
Meta
- License: BSD License (BSD-3-Clause)
- Author: Armin Ronacher
- Maintainer: Pallets
- Requires: Python >=3.7
Classifiers
- Development Status
- Intended Audience
- License
- Operating System
- Programming Language
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file itsdangerous-2.1.0.tar.gz
.
File metadata
- Download URL: itsdangerous-2.1.0.tar.gz
- Upload date:
- Size: 56.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d848fcb8bc7d507c4546b448574e8a44fc4ea2ba84ebf8d783290d53e81992f5 |
|
MD5 | f16ccadd2fbaa6b03a368789a18ba955 |
|
BLAKE2b-256 | 820089037083314067f1605233f6f30b94fdddc89d18e283b30b0c5be9e7f801 |
File details
Details for the file itsdangerous-2.1.0-py3-none-any.whl
.
File metadata
- Download URL: itsdangerous-2.1.0-py3-none-any.whl
- Upload date:
- Size: 15.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 29285842166554469a56d427addc0843914172343784cb909695fdbe90a3e129 |
|
MD5 | fe8269cff386af54b02bf883764de3ab |
|
BLAKE2b-256 | 53f864d2488f48332f33a6dbfe2f19d7bde7d750d9cb182b4b37c02eadec33d3 |