{ "info": { "author": "Marc Brinkmann", "author_email": "git@marcbrinkmann.de", "bugtrack_url": null, "classifiers": [], "description": ".. code::\n\n from alcohol.mixins.sqlalchemy import SQLAlchemyUserMixin\n\n class User(Base, SQLAlchemyUserMixin):\n id = Column(Integer, primary_key=True)\n\n bob = User()\n\n # stores a hash of bobs password (using passlib)\n bob.password = 'bobs_very_secret_password'\n\n if bob.check_password(some_password):\n print 'hello, bob!'\n\n # creates a password-reset token that will work once to change his password\n # after he forgot it, signed with the servers secret key\n token = bob.create_password_reset_token(SECRET_KEY)\n\n\nalcohol is a framework for handling user :doc:`authentication` and\n:doc:`authorization`. Both of these parts can be used independently and support\nSQLAlchemy_ and in-memory backends.\n\nAuthorization is handled using *Role Based Access Controls* (a\n`NIST `_-standard) as the underlying\nmodel::\n\n from alcohol.rbac import DictRBAC\n\n acl = DictRBAC()\n acl.assign('bob', 'programmer')\n acl.assign('alice', 'ceo')\n\n acl.permit('programmer', 'run_unittests')\n acl.permit('ceo', 'hire_and_fire')\n\n acl.allowed('bob', 'run_unittests') # True\n acl.allowed('bob', 'hire_and_fire') # False\n acl.allowed('alice', 'hire_and_fire') # True\n\n.. this should be put back in once flask-alcohol is stable/in better shape\n.. While suitable for use in stand-alone, non-web applications it is also a core\n.. ingredient to `Flask-Alcohol `_, a\n.. `Flask `_ library that takes this concept even\n.. further.\n\n\nUtilities\n---------\n\nalcohol also ships with a few SQLAlchemy_ mixins for handling updated/modified\ntimestamps, email fields, password-hashes and generating activation/reset\ntokens for the latter two. See :doc:`mixins` for details.\n\n\n.. [1] http://csrc.nist.gov/rbac/sandhu-ferraiolo-kuhn-00.pdf\n.. _SQLAlchemy: http://www.sqlalchemy.org/", "description_content_type": null, "docs_url": "https://pythonhosted.org/alcohol/", "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/mbr/alcohol", "keywords": null, "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "alcohol", "package_url": "https://pypi.org/project/alcohol/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/alcohol/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/mbr/alcohol" }, "release_url": "https://pypi.org/project/alcohol/0.5/", "requires_dist": null, "requires_python": null, "summary": "Handles user authentication, in a way.", "version": "0.5" }, "last_serial": 1850001, "releases": { "0.1dev": [], "0.2": [ { "comment_text": "", "digests": { "md5": "1fd2c9e1ca2119ac79c16e9897883768", "sha256": "92253ae62c029e7d26fb5c2de9db19edc1c5fda742aaa38cc2804861fa97de5a" }, "downloads": -1, "filename": "alcohol-0.2.tar.gz", "has_sig": true, "md5_digest": "1fd2c9e1ca2119ac79c16e9897883768", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6567, "upload_time": "2012-03-27T19:01:32", "url": "https://files.pythonhosted.org/packages/12/2d/abb41b2e34a0027e73fe54825ae3b67ff1928acb8471580284aeb3952b08/alcohol-0.2.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "1bb29f8b2f4b013c1e7910136fde402e", "sha256": "36bd067a1860bc9428fa3d941dc604048b5487206e20dd7d2fa2e748097f6a27" }, "downloads": -1, "filename": "alcohol-0.2.1.tar.gz", "has_sig": true, "md5_digest": "1bb29f8b2f4b013c1e7910136fde402e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6670, "upload_time": "2012-04-04T16:34:48", "url": "https://files.pythonhosted.org/packages/1f/65/7a18c5ede3a531072cb827b87f0573b780101d179f624b33dc6a0cc92c55/alcohol-0.2.1.tar.gz" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "468345150da877a2728b5a8204ec00a9", "sha256": "24d373e15f55df6e96341e86fb7b4d84dad0a8953b6afcf216e979099011cdb6" }, "downloads": -1, "filename": "alcohol-0.4.tar.gz", "has_sig": true, "md5_digest": "468345150da877a2728b5a8204ec00a9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5731, "upload_time": "2014-08-14T15:56:33", "url": "https://files.pythonhosted.org/packages/91/a5/fc1960b77f9d705429aba6ae87e9ac7dd562239fb50f2eed76350e594799/alcohol-0.4.tar.gz" } ], "0.5": [ { "comment_text": "", "digests": { "md5": "d7b19ac9ae0b7bc4c1542bc63992e1cb", "sha256": "227ee93d0aedfff3e04cc07e0ee6c4cd3a9e5b2dd2c33cac91a99d1ec3eba2ff" }, "downloads": -1, "filename": "alcohol-0.5.tar.gz", "has_sig": true, "md5_digest": "d7b19ac9ae0b7bc4c1542bc63992e1cb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6075, "upload_time": "2015-12-07T12:23:55", "url": "https://files.pythonhosted.org/packages/fc/73/368b65b24e263eb85eb1d1689b5498940a27c4e2a665f1a7ee4130404bf3/alcohol-0.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d7b19ac9ae0b7bc4c1542bc63992e1cb", "sha256": "227ee93d0aedfff3e04cc07e0ee6c4cd3a9e5b2dd2c33cac91a99d1ec3eba2ff" }, "downloads": -1, "filename": "alcohol-0.5.tar.gz", "has_sig": true, "md5_digest": "d7b19ac9ae0b7bc4c1542bc63992e1cb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6075, "upload_time": "2015-12-07T12:23:55", "url": "https://files.pythonhosted.org/packages/fc/73/368b65b24e263eb85eb1d1689b5498940a27c4e2a665f1a7ee4130404bf3/alcohol-0.5.tar.gz" } ] }