{ "info": { "author": "James Pic", "author_email": "jamespic@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": ".. image:: https://secure.travis-ci.org/yourlabs/django-rules-light.png?branch=master\n :target: http://travis-ci.org/yourlabs/django-rules-light\n.. image:: https://img.shields.io/pypi/dm/django-rules-light.svg\n :target: https://crate.io/packages/django-rules-light\n.. image:: https://img.shields.io/pypi/v/django-rules-light.svg \n :target: https://crate.io/packages/django-rules-light\n\nThis is a simple alternative to django-rules. The core difference is that\nit uses as registry that can be modified on runtime, instead of database\nmodels.\n\nOne of the goal is to enable developpers of external apps to make rules, depend\non it, while allowing a project to override rules.\n\nExample ``your_app/rules_light_registry.py``:\n\n.. code-block:: python\n\n # Everybody can read a blog post (for now!):\n rules_light.registry['blog.post.read'] = True\n\n # Require authentication to create a blog post, using a shortcut:\n rules_light.registry['blog.post.create'] = rules_light.is_authenticated\n\n def is_staff_or_mine(user, rule, obj):\n return user.is_staff or obj.author == user\n \n # But others shouldn't mess with my posts !\n rules_light.registry['blog.post.update'] = is_staff_or_mine\n rules_light.registry['blog.post.delete'] = is_staff_or_mine\n\nExample ``your_app/views.py``:\n\n.. code-block:: python\n\n @rules_light.class_decorator\n class PostDetailView(generic.DetailView):\n model = Post\n \n @rules_light.class_decorator\n class PostCreateView(generic.CreateView):\n model = Post\n \n @rules_light.class_decorator\n class PostUpdateView(generic.UpdateView):\n model = Post\n \n @rules_light.class_decorator\n class PostDeleteView(generic.DeleteView):\n model = Post\n\nYou might want to read the `tutorial\n`_ for\nmore.\n\nWhat's the catch ?\n------------------\n\nThe catch is that this approach does not offer any feature to get secure\nquerysets.\n\nThis means that the developper has to:\n\n- think about security when making querysets,\n- `override\n `_\n eventual external app ListViews,\n\nRequirements\n------------\n\n- Python 2.7+ (Python 3 supported)\n- Django 1.8+\n\nQuick Install\n-------------\n\n- Install module: ``pip install django-rules-light``,\n- Add to ``settings.INSTALLED_APPS``: ``rules_light``,\n- Add in ``settings.MIDDLEWARE_CLASSES`` (or ``settings.MIDDLEWARE`` for Django 1.10+): ``rules_light.middleware.Middleware``,\n\n\nYou might want to read the `tutorial\n`_.\n\nThere is also a lot of documentation, from the core to the tools, including\npointers to debug, log and test your security.\n\nContributing\n------------\n\nRun tests with the `tox\n`_ command. Documented patches passing all\ntests have more chances getting merged in, see `community guidelines\n`_ for details.\n\nResources\n---------\n\nYou could subscribe to the mailing list ask questions or just be informed of\npackage updates.\n\n- `Mailing list graciously hosted\n `_ by `Google\n `_\n- `Git graciously hosted\n `_ by `GitHub\n `_,\n- `Documentation graciously hosted\n `_ by `RTFD\n `_,\n- `Package graciously hosted\n `_ by `PyPi\n `_,\n- `Continuous integration graciously hosted\n `_ by `Travis-ci\n `_", "description_content_type": "text/x-rst", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/yourlabs/django-rules-light", "keywords": "django security rules acl rbac", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "django-rules-light", "package_url": "https://pypi.org/project/django-rules-light/", "platform": "", "project_url": "https://pypi.org/project/django-rules-light/", "project_urls": { "Homepage": "http://github.com/yourlabs/django-rules-light" }, "release_url": "https://pypi.org/project/django-rules-light/0.3.0/", "requires_dist": null, "requires_python": "", "summary": "Rule registry for django", "version": "0.3.0" }, "last_serial": 5137623, "releases": { "0.0.0": [ { "comment_text": "", "digests": { "md5": "84734a553114c513a5ee21de4e035459", "sha256": "5f69efc7f2bc93471aacf4195e8bec235ed54a7b599acb646f2412953ec3c931" }, "downloads": -1, "filename": "django-rules-light-0.0.0.tar.gz", "has_sig": false, "md5_digest": "84734a553114c513a5ee21de4e035459", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9738, "upload_time": "2012-11-27T11:48:32", "url": "https://files.pythonhosted.org/packages/c3/f3/be811cf53e8fefb66f2b8c31bf4e69cfd9865d06ac92a5394dcad21bcab6/django-rules-light-0.0.0.tar.gz" } ], "0.0.1": [ { "comment_text": "", "digests": { "md5": "e6bc5234b60598efb52b7f17e73b86a9", "sha256": "cc5a57c544281769489c10eb38225fff7336c3b1bb0d061f300ae2be6e155ca5" }, "downloads": -1, "filename": "django-rules-light-0.0.1.tar.gz", "has_sig": false, "md5_digest": "e6bc5234b60598efb52b7f17e73b86a9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9770, "upload_time": "2012-11-28T14:01:06", "url": "https://files.pythonhosted.org/packages/3c/b9/81f811e274ec04a7c657abbbe6548dcad26b9113635d16aea3d6e6f00d48/django-rules-light-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "1c76330133f5891b3f9687093d3bcf8d", "sha256": "cfab07161ef23e90155937eb34ceb623ea4a24a9cd80181ad245fc3c63f9b318" }, "downloads": -1, "filename": "django-rules-light-0.0.2.tar.gz", "has_sig": false, "md5_digest": "1c76330133f5891b3f9687093d3bcf8d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13682, "upload_time": "2012-11-30T11:03:25", "url": "https://files.pythonhosted.org/packages/ab/71/f224eab8d52636562f15eaed1704c036fa7197c5c6d0e45e5ce0207a2012/django-rules-light-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "a48bf0cc46310f1a215e36fb9a7092d4", "sha256": "11a1e74b531eab0fd06242d1ea833644881e39a59b22aff41925e92164369ced" }, "downloads": -1, "filename": "django-rules-light-0.0.3.tar.gz", "has_sig": false, "md5_digest": "a48bf0cc46310f1a215e36fb9a7092d4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13878, "upload_time": "2012-11-30T11:54:11", "url": "https://files.pythonhosted.org/packages/34/34/324dab1cbeea06da2b3e1e212530f6f94c53c5cf690a428671f7f7b6b3c6/django-rules-light-0.0.3.tar.gz" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "64bbba063c16b79b8db39744fa25a3aa", "sha256": "b1f3550cfe58f454dd0e16ebc2b6f030960db505b8f27483591f150606c631a3" }, "downloads": -1, "filename": "django-rules-light-0.0.5.tar.gz", "has_sig": false, "md5_digest": "64bbba063c16b79b8db39744fa25a3aa", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14699, "upload_time": "2012-12-11T00:37:30", "url": "https://files.pythonhosted.org/packages/05/13/06360e5756395f5cc0f9c92bdf2a807937f72218faf6de1336e86d6e893d/django-rules-light-0.0.5.tar.gz" } ], "0.0.6": [ { "comment_text": "", "digests": { "md5": "dd78db3e451f421a72da42acf5235e70", "sha256": "47afe850a4b1e74c55c6c1a145557683968fcea353a5eecb44f6383287c1b517" }, "downloads": -1, "filename": "django-rules-light-0.0.6.tar.gz", "has_sig": false, "md5_digest": "dd78db3e451f421a72da42acf5235e70", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14947, "upload_time": "2013-01-29T10:14:41", "url": "https://files.pythonhosted.org/packages/da/5e/9e5a26ee4cdb6fd0ba792c2a1843abbb4a5853470dc5ada9c8db392c1fff/django-rules-light-0.0.6.tar.gz" } ], "0.0.7": [ { "comment_text": "", "digests": { "md5": "57047ea6f8b146e8996b2fbb9c07efcb", "sha256": "f9670d698c2ff3dc72c517633056f40d2aab58d9f1336c91ef07476d08b12c96" }, "downloads": -1, "filename": "django-rules-light-0.0.7.tar.gz", "has_sig": false, "md5_digest": "57047ea6f8b146e8996b2fbb9c07efcb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15772, "upload_time": "2013-02-13T15:20:30", "url": "https://files.pythonhosted.org/packages/77/30/73dcb9019e040e042e234d7e4daa24b5fe19c823f7db671d4853d9801a27/django-rules-light-0.0.7.tar.gz" } ], "0.0.8": [ { "comment_text": "", "digests": { "md5": "38d0aa8fca1411ea582743be49f28af3", "sha256": "9cff7d79391ce7b7509a0e09f1ebb85563e3b00ff065dc7c88e94f76c46f18cc" }, "downloads": -1, "filename": "django-rules-light-0.0.8.tar.gz", "has_sig": false, "md5_digest": "38d0aa8fca1411ea582743be49f28af3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15855, "upload_time": "2013-02-13T17:13:20", "url": "https://files.pythonhosted.org/packages/fe/8f/1e247f02c8d94b4ba8dc48853cc6d7b1fdb1370dbc61fe5a1750003bb39b/django-rules-light-0.0.8.tar.gz" } ], "0.0.9": [ { "comment_text": "", "digests": { "md5": "14492ab1db487de677b62023537d265a", "sha256": "12d553aa58728691d02941c0909efdb2825cc2c440aae3fb30c004a90fbbd968" }, "downloads": -1, "filename": "django-rules-light-0.0.9.tar.gz", "has_sig": false, "md5_digest": "14492ab1db487de677b62023537d265a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16411, "upload_time": "2013-03-26T13:06:39", "url": "https://files.pythonhosted.org/packages/08/fd/828642398aebb4adb7885b08602f06a92a4a52acb23e0b24a922eb1bd943/django-rules-light-0.0.9.tar.gz" } ], "0.1.0": [ { "comment_text": "", "digests": { "md5": "c50e3412502422abd9e07c18405773aa", "sha256": "9e12d416567a48a9eb31d7874b146bfdc80e7dcd2f2b5f6d7d3863c0a4fa877d" }, "downloads": -1, "filename": "django-rules-light-0.1.0.tar.gz", "has_sig": false, "md5_digest": "c50e3412502422abd9e07c18405773aa", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16217, "upload_time": "2013-09-25T13:24:32", "url": "https://files.pythonhosted.org/packages/74/9d/9d91f7fe8af049304e2ef32c4aed1ba95e60a70a8f390e9c8d5d23a7e6c9/django-rules-light-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "cfc9a7b0db60aa756294e9d01fbaf758", "sha256": "b2dd03fa7812e02bfe0f3df1a88c4f9392e38d591eccc1ba8e67ef8b520c010d" }, "downloads": -1, "filename": "django-rules-light-0.1.1.tar.gz", "has_sig": false, "md5_digest": "cfc9a7b0db60aa756294e9d01fbaf758", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16249, "upload_time": "2013-09-25T14:01:05", "url": "https://files.pythonhosted.org/packages/1d/e4/0252311826e3089d48076bb765b410ef1ea42211db5847faf1baa55227ff/django-rules-light-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "407297ec6aa05a49108f4a2bf4524003", "sha256": "791c2cbaeff785820f604074a91ea59a00f0cdc45a782cae52c4e6f0c934393e" }, "downloads": -1, "filename": "django-rules-light-0.1.2.tar.gz", "has_sig": false, "md5_digest": "407297ec6aa05a49108f4a2bf4524003", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16971, "upload_time": "2013-12-11T17:45:37", "url": "https://files.pythonhosted.org/packages/d9/45/5fdeef1412a2734ce01bec56a7c0af821bec7d3a03c899c693fd1bd3f3bb/django-rules-light-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "49163cf9017243033d92d39b05b43cfe", "sha256": "1073d2fb65ee64bbace36ac38e20e264e3e71463ec426e96e1911b2e8cd24ae4" }, "downloads": -1, "filename": "django-rules-light-0.1.3.tar.gz", "has_sig": false, "md5_digest": "49163cf9017243033d92d39b05b43cfe", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17159, "upload_time": "2015-04-18T02:16:03", "url": "https://files.pythonhosted.org/packages/4d/ed/2688e7d756dacf0bcd697851133ace140382730c9678ac8a1840542fbb74/django-rules-light-0.1.3.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "c454e4ea5886d21922ce5b5ea777cb9f", "sha256": "13e8b85ab1daae590e5a944a1c82d1dc6afd45d45c7af426db61c0c39540e9f3" }, "downloads": -1, "filename": "django-rules-light-0.2.0.tar.gz", "has_sig": true, "md5_digest": "c454e4ea5886d21922ce5b5ea777cb9f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18128, "upload_time": "2015-04-23T00:19:23", "url": "https://files.pythonhosted.org/packages/61/55/e87ea7177e2bf9fe20a1c3c20932eaa3a3d68bcaa8bebd5c38cfd3a72d85/django-rules-light-0.2.0.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "5d541761436158a1f7a5e6a0d552969e", "sha256": "8f016dcb948155c87a6ce9c1cd463429cb1af4240c4a9dcfc544f13ba00e7b02" }, "downloads": -1, "filename": "django-rules-light-0.3.0.tar.gz", "has_sig": false, "md5_digest": "5d541761436158a1f7a5e6a0d552969e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16725, "upload_time": "2019-04-13T08:57:13", "url": "https://files.pythonhosted.org/packages/80/b2/bb44f6262b285bf7aee1816e65e930abea35fc9b753a0ebc331412ab2490/django-rules-light-0.3.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "5d541761436158a1f7a5e6a0d552969e", "sha256": "8f016dcb948155c87a6ce9c1cd463429cb1af4240c4a9dcfc544f13ba00e7b02" }, "downloads": -1, "filename": "django-rules-light-0.3.0.tar.gz", "has_sig": false, "md5_digest": "5d541761436158a1f7a5e6a0d552969e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16725, "upload_time": "2019-04-13T08:57:13", "url": "https://files.pythonhosted.org/packages/80/b2/bb44f6262b285bf7aee1816e65e930abea35fc9b753a0ebc331412ab2490/django-rules-light-0.3.0.tar.gz" } ] }