itsdangerous


Nameitsdangerous JSON
Version 2.2.0 PyPI version JSON
download
home_pageNone
SummarySafely pass data to untrusted environments and back.
upload_time2024-04-16 21:28:15
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # ItsDangerous

... 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.


## A Simple Example

Here's how you could generate a token for transmitting a user's id and
name between web requests.

```python
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][].

[please donate today]: https://palletsprojects.com/donate


            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "itsdangerous",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "Pallets <contact@palletsprojects.com>",
    "keywords": null,
    "author": null,
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/9c/cb/8ac0172223afbccb63986cc25049b154ecfb5e85932587206f42317be31d/itsdangerous-2.2.0.tar.gz",
    "platform": null,
    "description": "# ItsDangerous\n\n... so better sign this\n\nVarious helpers to pass data to untrusted environments and to get it\nback safe and sound. Data is cryptographically signed to ensure that a\ntoken has not been tampered with.\n\nIt's possible to customize how data is serialized. Data is compressed as\nneeded. A timestamp can be added and verified automatically while\nloading a token.\n\n\n## A Simple Example\n\nHere's how you could generate a token for transmitting a user's id and\nname between web requests.\n\n```python\nfrom itsdangerous import URLSafeSerializer\nauth_s = URLSafeSerializer(\"secret key\", \"auth\")\ntoken = auth_s.dumps({\"id\": 5, \"name\": \"itsdangerous\"})\n\nprint(token)\n# eyJpZCI6NSwibmFtZSI6Iml0c2Rhbmdlcm91cyJ9.6YP6T0BaO67XP--9UzTrmurXSmg\n\ndata = auth_s.loads(token)\nprint(data[\"name\"])\n# itsdangerous\n```\n\n\n## Donate\n\nThe Pallets organization develops and supports ItsDangerous and other\npopular packages. In order to grow the community of contributors and\nusers, and allow the maintainers to devote more time to the projects,\n[please donate today][].\n\n[please donate today]: https://palletsprojects.com/donate\n\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Safely pass data to untrusted environments and back.",
    "version": "2.2.0",
    "project_urls": {
        "Changes": "https://itsdangerous.palletsprojects.com/changes/",
        "Chat": "https://discord.gg/pallets",
        "Documentation": "https://itsdangerous.palletsprojects.com/",
        "Donate": "https://palletsprojects.com/donate",
        "Source": "https://github.com/pallets/itsdangerous/"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "049692447566d16df59b2a776c0fb82dbc4d9e07cd95062562af01e408583fc4",
                "md5": "22e41bfb2008481e855f1693a9df4c54",
                "sha256": "c6242fc49e35958c8b15141343aa660db5fc54d4f13a1db01a3f5891b98700ef"
            },
            "downloads": -1,
            "filename": "itsdangerous-2.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "22e41bfb2008481e855f1693a9df4c54",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 16234,
            "upload_time": "2024-04-16T21:28:14",
            "upload_time_iso_8601": "2024-04-16T21:28:14.499616Z",
            "url": "https://files.pythonhosted.org/packages/04/96/92447566d16df59b2a776c0fb82dbc4d9e07cd95062562af01e408583fc4/itsdangerous-2.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9ccb8ac0172223afbccb63986cc25049b154ecfb5e85932587206f42317be31d",
                "md5": "a901babde35694c3577f7655010cd380",
                "sha256": "e0050c0b7da1eea53ffaf149c0cfbb5c6e2e2b69c4bef22c81fa6eb73e5f6173"
            },
            "downloads": -1,
            "filename": "itsdangerous-2.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "a901babde35694c3577f7655010cd380",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 54410,
            "upload_time": "2024-04-16T21:28:15",
            "upload_time_iso_8601": "2024-04-16T21:28:15.614771Z",
            "url": "https://files.pythonhosted.org/packages/9c/cb/8ac0172223afbccb63986cc25049b154ecfb5e85932587206f42317be31d/itsdangerous-2.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-16 21:28:15",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "pallets",
    "github_project": "itsdangerous",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "itsdangerous"
}
        
Elapsed time: 0.24849s