Name | flask-session-cookie-manager JSON |
Version |
1.2.2
JSON |
| download |
home_page | None |
Summary | Flask Session Cookie Decoder/Encoder |
upload_time | 2025-01-02 00:28:38 |
maintainer | None |
docs_url | None |
author | Wilson Sumanang |
requires_python | None |
license | MIT License Copyright (c) 2020 Alexandre ZANNI Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
keywords |
flask
cookie
decoder
encoder
session
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Flask Session Cookie Decoder/Encoder
[](https://github.com/noraj/flask-session-cookie-manager)
[](https://github.com/noraj/flask-session-cookie-manager)
[](https://inventory.raw.pm/tools.html#Flask%20Session%20Cookie%20Decoder/Encoder)

[](https://github.com/noraj/flask-session-cookie-manager/blob/master/LICENSE)
Original author : [**Wilson Sumanang**](https://github.com/saruberoz)
Fixes and improvements author : [**Alexandre ZANNI**](https://github.com/noraj)
Imported from [saruberoz.github.io](http://saruberoz.github.io/flask-session-cookie-decoder-slash-encoder)
## Depencencies
+ Python 2 or Python 3
+ [itsdangerous](https://pypi.python.org/pypi/itsdangerous)
+ [Flask](https://pypi.python.org/pypi/Flask)
## Installation
### Package
[](https://repology.org/project/python:flask-session-cookie-manager/versions)
#### BlackArch Linux
```
# pacman -S flask-session-cookie-manager{3,2}
```
### Git
#### ArchLinux
Both python3 and python2:
```
$ git clone https://github.com/noraj/flask-session-cookie-manager.git && cd flask-session-cookie-manager
# makepkg -sic
```
#### Other distros
Find your way with your package manager, use pip in a virtual environment or use [pyenv](https://github.com/pyenv/pyenv).
Eg.
```
$ git clone https://github.com/noraj/flask-session-cookie-manager.git && cd flask-session-cookie-manager
$ python -m venv venv
$ source venv/bin/activate
$ pip install setuptools
$ python -m pip install .
```
## Usage
Use `flask_session_cookie_manager3.py` with Python 3 and `flask_session_cookie_manager2.py` with Python 2.
```
usage: flask_session_cookie_manager{2,3}.py [-h] {encode,decode} ...
Flask Session Cookie Decoder/Encoder
positional arguments:
{encode,decode} sub-command help
encode encode
decode decode
optional arguments:
-h, --help show this help message and exit
```
### Encode
```
usage: flask_session_cookie_manager{2,3}.py encode [-h] -s <string> -t <string>
optional arguments:
-h, --help show this help message and exit
-s <string>, --secret-key <string>
Secret key
-t <string>, --cookie-structure <string>
Session cookie structure
```
### Decode
```
usage: flask_session_cookie_manager{2,3}.py decode [-h] [-s <string>] -c <string>
optional arguments:
-h, --help show this help message and exit
-s <string>, --secret-key <string>
Secret key
-c <string>, --cookie-value <string>
Session cookie value
```
## Examples
### Encode
```
$ python{2,3} flask_session_cookie_manager{2,3}.py encode -s '.{y]tR&sp&77RdO~u3@XAh#TalD@Oh~yOF_51H(QV};K|ghT^d' -t '{"number":"326410031505","username":"admin"}'
eyJudW1iZXIiOnsiIGIiOiJNekkyTkRFd01ETXhOVEExIn0sInVzZXJuYW1lIjp7IiBiIjoiWVdSdGFXND0ifX0.DE2iRA.ig5KSlnmsDH4uhDpmsFRPupB5Vw
```
**Note**: the session cookie structure must be a valid python dictionary
### Decode
With secret key:
```
$ python{2,3} flask_session_cookie_manager{2,3}.py decode -c 'eyJudW1iZXIiOnsiIGIiOiJNekkyTkRFd01ETXhOVEExIn0sInVzZXJuYW1lIjp7IiBiIjoiWVdSdGFXND0ifX0.DE2iRA.ig5KSlnmsDH4uhDpmsFRPupB5Vw' -s '.{y]tR&sp&77RdO~u3@XAh#TalD@Oh~yOF_51H(QV};K|ghT^d'
{u'username': 'admin', u'number': '326410031505'}
```
Without secret key (less pretty output):
```
$ python{2,3} flask_session_cookie_manager{2,3}.py decode -c 'eyJudW1iZXIiOnsiIGIiOiJNekkyTkRFd01ETXhOVEExIn0sInVzZXJuYW1lIjp7IiBiIjoiWVdSdGFXND0ifX0.DE2iRA.ig5KSlnmsDH4uhDpmsFRPupB5Vw'
{"number":{" b":"MzI2NDEwMDMxNTA1"},"username":{" b":"YWRtaW4="}}
```
Raw data
{
"_id": null,
"home_page": null,
"name": "flask-session-cookie-manager",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": "Alexandre ZANNI <alexandre.zanni@europe.com>",
"keywords": "Flask, cookie, decoder, encoder, session",
"author": "Wilson Sumanang",
"author_email": "Alexandre ZANNI <alexandre.zanni@europe.com>",
"download_url": "https://files.pythonhosted.org/packages/48/82/6ba51d3d131374f24f70b270c6f58ada9a46782ed70210010f3456c8f014/flask_session_cookie_manager-1.2.2.tar.gz",
"platform": null,
"description": "# Flask Session Cookie Decoder/Encoder\n\n[](https://github.com/noraj/flask-session-cookie-manager)\n[](https://github.com/noraj/flask-session-cookie-manager)\n[](https://inventory.raw.pm/tools.html#Flask%20Session%20Cookie%20Decoder/Encoder)\n\n[](https://github.com/noraj/flask-session-cookie-manager/blob/master/LICENSE)\n\nOriginal author : [**Wilson Sumanang**](https://github.com/saruberoz)\n\nFixes and improvements author : [**Alexandre ZANNI**](https://github.com/noraj)\n\nImported from [saruberoz.github.io](http://saruberoz.github.io/flask-session-cookie-decoder-slash-encoder)\n\n## Depencencies\n\n+ Python 2 or Python 3\n+ [itsdangerous](https://pypi.python.org/pypi/itsdangerous)\n+ [Flask](https://pypi.python.org/pypi/Flask)\n\n## Installation\n\n### Package\n\n[](https://repology.org/project/python:flask-session-cookie-manager/versions)\n\n#### BlackArch Linux\n\n```\n# pacman -S flask-session-cookie-manager{3,2}\n```\n\n### Git\n\n#### ArchLinux\n\nBoth python3 and python2:\n\n```\n$ git clone https://github.com/noraj/flask-session-cookie-manager.git && cd flask-session-cookie-manager\n# makepkg -sic\n```\n\n#### Other distros\n\nFind your way with your package manager, use pip in a virtual environment or use [pyenv](https://github.com/pyenv/pyenv).\n\nEg.\n\n```\n$ git clone https://github.com/noraj/flask-session-cookie-manager.git && cd flask-session-cookie-manager\n$ python -m venv venv\n$ source venv/bin/activate\n$ pip install setuptools\n$ python -m pip install .\n```\n\n## Usage\n\nUse `flask_session_cookie_manager3.py` with Python 3 and `flask_session_cookie_manager2.py` with Python 2.\n\n```\nusage: flask_session_cookie_manager{2,3}.py [-h] {encode,decode} ...\n\nFlask Session Cookie Decoder/Encoder\n\npositional arguments:\n {encode,decode} sub-command help\n encode encode\n decode decode\n\noptional arguments:\n -h, --help show this help message and exit\n```\n\n### Encode\n\n```\nusage: flask_session_cookie_manager{2,3}.py encode [-h] -s <string> -t <string>\n\noptional arguments:\n -h, --help show this help message and exit\n -s <string>, --secret-key <string>\n Secret key\n -t <string>, --cookie-structure <string>\n Session cookie structure\n```\n\n### Decode\n\n```\nusage: flask_session_cookie_manager{2,3}.py decode [-h] [-s <string>] -c <string>\n\noptional arguments:\n -h, --help show this help message and exit\n -s <string>, --secret-key <string>\n Secret key\n -c <string>, --cookie-value <string>\n Session cookie value\n```\n\n## Examples\n\n### Encode\n\n```\n$ python{2,3} flask_session_cookie_manager{2,3}.py encode -s '.{y]tR&sp&77RdO~u3@XAh#TalD@Oh~yOF_51H(QV};K|ghT^d' -t '{\"number\":\"326410031505\",\"username\":\"admin\"}'\neyJudW1iZXIiOnsiIGIiOiJNekkyTkRFd01ETXhOVEExIn0sInVzZXJuYW1lIjp7IiBiIjoiWVdSdGFXND0ifX0.DE2iRA.ig5KSlnmsDH4uhDpmsFRPupB5Vw\n```\n\n**Note**: the session cookie structure must be a valid python dictionary\n\n### Decode\n\nWith secret key:\n\n```\n$ python{2,3} flask_session_cookie_manager{2,3}.py decode -c 'eyJudW1iZXIiOnsiIGIiOiJNekkyTkRFd01ETXhOVEExIn0sInVzZXJuYW1lIjp7IiBiIjoiWVdSdGFXND0ifX0.DE2iRA.ig5KSlnmsDH4uhDpmsFRPupB5Vw' -s '.{y]tR&sp&77RdO~u3@XAh#TalD@Oh~yOF_51H(QV};K|ghT^d'\n{u'username': 'admin', u'number': '326410031505'}\n```\n\nWithout secret key (less pretty output):\n\n```\n$ python{2,3} flask_session_cookie_manager{2,3}.py decode -c 'eyJudW1iZXIiOnsiIGIiOiJNekkyTkRFd01ETXhOVEExIn0sInVzZXJuYW1lIjp7IiBiIjoiWVdSdGFXND0ifX0.DE2iRA.ig5KSlnmsDH4uhDpmsFRPupB5Vw'\n{\"number\":{\" b\":\"MzI2NDEwMDMxNTA1\"},\"username\":{\" b\":\"YWRtaW4=\"}}\n```\n",
"bugtrack_url": null,
"license": "MIT License Copyright (c) 2020 Alexandre ZANNI Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
"summary": "Flask Session Cookie Decoder/Encoder",
"version": "1.2.2",
"project_urls": {
"Homepage": "https://noraj.github.io/flask-session-cookie-manager/",
"Issues": "https://github.com/noraj/flask-session-cookie-manager/issues",
"Repository": "https://github.com/noraj/flask-session-cookie-manager"
},
"split_keywords": [
"flask",
" cookie",
" decoder",
" encoder",
" session"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "8cca20dbd2098d7425f5c73b65d729d0667106f193b4c107f8609bd08c2caaf8",
"md5": "9f713a38ec4ec649f40e793b7e632b49",
"sha256": "03283b26491eec6003e563765171f4b7937f86eacfc22df52c093729810fa512"
},
"downloads": -1,
"filename": "flask_session_cookie_manager-1.2.2-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "9f713a38ec4ec649f40e793b7e632b49",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 4384,
"upload_time": "2025-01-02T00:28:35",
"upload_time_iso_8601": "2025-01-02T00:28:35.931332Z",
"url": "https://files.pythonhosted.org/packages/8c/ca/20dbd2098d7425f5c73b65d729d0667106f193b4c107f8609bd08c2caaf8/flask_session_cookie_manager-1.2.2-py2.py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "48826ba51d3d131374f24f70b270c6f58ada9a46782ed70210010f3456c8f014",
"md5": "80820ca8174d988d137bab899cc443fd",
"sha256": "12e08234127d20b0991eea434fc51be2b78739637167c3a9fa7413ff786625e8"
},
"downloads": -1,
"filename": "flask_session_cookie_manager-1.2.2.tar.gz",
"has_sig": false,
"md5_digest": "80820ca8174d988d137bab899cc443fd",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 6192,
"upload_time": "2025-01-02T00:28:38",
"upload_time_iso_8601": "2025-01-02T00:28:38.451152Z",
"url": "https://files.pythonhosted.org/packages/48/82/6ba51d3d131374f24f70b270c6f58ada9a46782ed70210010f3456c8f014/flask_session_cookie_manager-1.2.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-02 00:28:38",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "noraj",
"github_project": "flask-session-cookie-manager",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "flask-session-cookie-manager"
}