Flask-Paranoid


NameFlask-Paranoid JSON
Version 0.3.0 PyPI version JSON
download
home_pagehttps://github.com/miguelgrinberg/flask-paranoid
SummarySimple user session protection
upload_time2022-04-02 16:27:09
maintainer
docs_urlhttps://pythonhosted.org/Flask-Paranoid/
authorMiguel Grinberg
requires_python>=3.6
license
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI
coveralls test coverage No coveralls.
            flask-paranoid
==============

[![Build status](https://github.com/miguelgrinberg/flask-paranoid/workflows/build/badge.svg)](https://github.com/miguelgrinberg/flask-paranoid/actions) [![codecov](https://codecov.io/gh/miguelgrinberg/flask-paranoid/branch/main/graph/badge.svg)](https://codecov.io/gh/miguelgrinberg/flask-paranoid)

Simple user session protection.

Quick Start
-----------

Here is a simple application that uses Flask-Paranoid to protect the user session:

```python
from flask import Flask
from flask_paranoid import Paranoid

app = Flask(__name__)
app.config['SECRET_KEY'] = 'top-secret!'

paranoid = Paranoid(app)
paranoid.redirect_view = '/'

@app.route('/')
def index():
    return render_template('index.html')
```

When a client connects to this application, a "paranoid" token will be
generated according to the IP address and user agent. In all subsequent
requests, the token will be recalculated and checked against the one computed
for the first request. If the session cookie is stolen and the attacker tries
to use it from another location, the generated token will be different, and in
that case the extension will clear the session and block the request.

Resources
---------

- [Documentation](http://pythonhosted.org/Flask-Paranoid)
- [PyPI](https://pypi.python.org/pypi/flask-paranoid)
- [Change Log](https://github.com/miguelgrinberg/flask-paranoid/blob/main/CHANGES.md)



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/miguelgrinberg/flask-paranoid",
    "name": "Flask-Paranoid",
    "maintainer": "",
    "docs_url": "https://pythonhosted.org/Flask-Paranoid/",
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "",
    "author": "Miguel Grinberg",
    "author_email": "miguel.grinberg@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/f0/03/8e4eb2d4e3ffdd436a71f273dc6443c30766b55194a009264ee6eb2c5fde/Flask-Paranoid-0.3.0.tar.gz",
    "platform": null,
    "description": "flask-paranoid\n==============\n\n[![Build status](https://github.com/miguelgrinberg/flask-paranoid/workflows/build/badge.svg)](https://github.com/miguelgrinberg/flask-paranoid/actions) [![codecov](https://codecov.io/gh/miguelgrinberg/flask-paranoid/branch/main/graph/badge.svg)](https://codecov.io/gh/miguelgrinberg/flask-paranoid)\n\nSimple user session protection.\n\nQuick Start\n-----------\n\nHere is a simple application that uses Flask-Paranoid to protect the user session:\n\n```python\nfrom flask import Flask\nfrom flask_paranoid import Paranoid\n\napp = Flask(__name__)\napp.config['SECRET_KEY'] = 'top-secret!'\n\nparanoid = Paranoid(app)\nparanoid.redirect_view = '/'\n\n@app.route('/')\ndef index():\n    return render_template('index.html')\n```\n\nWhen a client connects to this application, a \"paranoid\" token will be\ngenerated according to the IP address and user agent. In all subsequent\nrequests, the token will be recalculated and checked against the one computed\nfor the first request. If the session cookie is stolen and the attacker tries\nto use it from another location, the generated token will be different, and in\nthat case the extension will clear the session and block the request.\n\nResources\n---------\n\n- [Documentation](http://pythonhosted.org/Flask-Paranoid)\n- [PyPI](https://pypi.python.org/pypi/flask-paranoid)\n- [Change Log](https://github.com/miguelgrinberg/flask-paranoid/blob/main/CHANGES.md)\n\n\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Simple user session protection",
    "version": "0.3.0",
    "project_urls": {
        "Bug Tracker": "https://github.com/miguelgrinberg/flask-paranoid/issues",
        "Homepage": "https://github.com/miguelgrinberg/flask-paranoid"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f3d73c054c416a575bc1775ef506fddd0faef4af734a8047d815c7cbb600eb5a",
                "md5": "ae7d469133757255ff47212a4cb92ec0",
                "sha256": "8cb48aadfbee5aefe8a75e7436f3a31e426a170a893f022a50e7e4f569ad0850"
            },
            "downloads": -1,
            "filename": "Flask_Paranoid-0.3.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ae7d469133757255ff47212a4cb92ec0",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 4536,
            "upload_time": "2022-04-02T16:27:08",
            "upload_time_iso_8601": "2022-04-02T16:27:08.281205Z",
            "url": "https://files.pythonhosted.org/packages/f3/d7/3c054c416a575bc1775ef506fddd0faef4af734a8047d815c7cbb600eb5a/Flask_Paranoid-0.3.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f0038e4eb2d4e3ffdd436a71f273dc6443c30766b55194a009264ee6eb2c5fde",
                "md5": "a7a112907060e722fb783fe1107c85e3",
                "sha256": "46c049ba701b25f1ccf3988164e1bfb12320ab55f1de66384b012f7767bb8058"
            },
            "downloads": -1,
            "filename": "Flask-Paranoid-0.3.0.tar.gz",
            "has_sig": false,
            "md5_digest": "a7a112907060e722fb783fe1107c85e3",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 4296,
            "upload_time": "2022-04-02T16:27:09",
            "upload_time_iso_8601": "2022-04-02T16:27:09.672833Z",
            "url": "https://files.pythonhosted.org/packages/f0/03/8e4eb2d4e3ffdd436a71f273dc6443c30766b55194a009264ee6eb2c5fde/Flask-Paranoid-0.3.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-04-02 16:27:09",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "miguelgrinberg",
    "github_project": "flask-paranoid",
    "travis_ci": true,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "flask-paranoid"
}
        
Elapsed time: 0.40308s