{ "info": { "author": "Bruno Marques", "author_email": "bruno@cravefood.services", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Framework :: Django", "Framework :: Flask", "Framework :: Pyramid", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3", "Topic :: Utilities" ], "description": "**DEPRECATED.** We're now part of the restless_ team, so development will continue there.\n\n========\nrestkiss\n========\n\n.. image:: https://travis-ci.org/CraveFood/restkiss.png?branch=master\n :target: https://travis-ci.org/CraveFood/restkiss\n\nA fork of the restless_ lightweight REST miniframework for Python.\n\nDocumentation is at http://restkiss.readthedocs.io/.\n\nWorks great with Django_, Flask_, Pyramid_, Tornado_ & Itty_, but should be useful for\nmany other Python web frameworks. Based on the lessons learned from Tastypie_\n& other REST libraries.\n\n.. _restless: http://github.com/toastdriven/restless\n.. _Django: http://djangoproject.com/\n.. _Flask: http://flask.pocoo.org/\n.. _Pyramid: http://www.pylonsproject.org/\n.. _Itty: https://pypi.python.org/pypi/itty\n.. _Tastypie: http://tastypieapi.org/\n.. _Tornado: http://www.tornadoweb.org/\n.. _tox: https://tox.readthedocs.io/\n\n\nFeatures\n========\n\n* Small, fast codebase\n* JSON output by default, but overridable\n* RESTful\n* Python 3.2+ (with shims to make broke-ass Python 2.6+ work)\n* Flexible\n\n\nAnti-Features\n=============\n\nThings that will never be added to the core library - but plugins are encouraged!\n\n* Automatic ORM integration\n* Authorization (per-object or not)\n* Extensive filtering options\n* XML output\n* Metaclasses\n* Mixins\n* HATEOAS\n\n\nWhy?\n====\n\nCreator `@toastdriven `_ had a very specific goal when building the original\nrestless_, and our goal is to respect it. Here it follows:\n\n> Quite simply, I care about creating flexible & RESTful APIs. In building\n> Tastypie, I tried to create something extremely complete & comprehensive.\n> The result was writing a lot of hook methods (for easy extensibility) & a lot\n> of (perceived) bloat, as I tried to accommodate for everything people might\n> want/need in a flexible/overridable manner.\n>\n> But in reality, all I really ever personally want are the RESTful verbs, JSON\n> serialization & the ability of override behavior.\n>\n> This one is written for me, but maybe it's useful to you.\n\n\nManifesto\n=========\n\nRather than try to build something that automatically does the typically\ncorrect thing within each of the views, it's up to you to implement the bodies\nof various HTTP methods.\n\nExample code:\n\n.. code:: python\n\n # posts/api.py\n from django.contrib.auth.models import User\n\n from restkiss.dj import DjangoResource\n from restkiss.preparers import FieldsPreparer\n\n from posts.models import Post\n\n\n class PostResource(DjangoResource):\n # Controls what data is included in the serialized output.\n preparer = FieldsPreparer(fields={\n 'id': 'id',\n 'title': 'title',\n 'author': 'user.username',\n 'body': 'content',\n 'posted_on': 'posted_on',\n })\n\n # GET /\n def list(self):\n return Post.objects.all()\n\n # GET /pk/\n def detail(self, pk):\n return Post.objects.get(id=pk)\n\n # POST /\n def create(self):\n return Post.objects.create(\n title=self.data['title'],\n user=User.objects.get(username=self.data['author']),\n content=self.data['body']\n )\n\n # PUT /pk/\n def update(self, pk):\n try:\n post = Post.objects.get(id=pk)\n except Post.DoesNotExist:\n post = Post()\n\n post.title = self.data['title']\n post.user = User.objects.get(username=self.data['author'])\n post.content = self.data['body']\n post.save()\n return post\n\n # DELETE /pk/\n def delete(self, pk):\n Post.objects.get(id=pk).delete()\n\nHooking it up:\n\n.. code:: python\n\n # api/urls.py\n from django.conf.urls.default import url, include\n\n from posts.api import PostResource\n\n urlpatterns = [\n # The usual suspects, then...\n\n url(r'^api/posts/', include(PostResource.urls())),\n ]\n\n\nLicence\n=======\n\nBSD\n\n\nRunning the Tests\n=================\n\nThe test suite uses tox_ for simultaneous support of multiple versions of both\nPython and Django. The current versions of Python supported are:\n\n* CPython 2.7\n* CPython 3.4\n* CPython 3.5\n* PyPy (Python 2.7)\n* PyPy3 (Python 3.2)\n* PyPy3 beta (Python 3.3)\n\nYou just need to install the Python interpreters above and the `tox` package\n(available via `pip`), then run the `tox` command.", "description_content_type": null, "docs_url": null, "download_url": null, "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/CraveFood/restkiss", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "restkiss", "package_url": "https://pypi.org/project/restkiss/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/restkiss/", "project_urls": { "Homepage": "http://github.com/CraveFood/restkiss" }, "release_url": "https://pypi.org/project/restkiss/2.0.2/", "requires_dist": null, "requires_python": null, "summary": "A lightweight REST miniframework for Python.", "version": "2.0.2" }, "last_serial": 2459940, "releases": { "2.0.2": [ { "comment_text": "", "digests": { "md5": "c40c23c5cfcd61b2f49172e7696c7e5a", "sha256": "fae21c0cc3cbc4f3854d2d1c7217a70e25245db8e124bfd72c8fbd689e6b50b3" }, "downloads": -1, "filename": "restkiss-2.0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "c40c23c5cfcd61b2f49172e7696c7e5a", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 22681, "upload_time": "2016-10-15T22:30:13", "url": "https://files.pythonhosted.org/packages/14/7b/78e535b01bd13fc3be3703f4c4c5be2484ff4fca817398d6ee1e344013de/restkiss-2.0.2-py2.py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c40c23c5cfcd61b2f49172e7696c7e5a", "sha256": "fae21c0cc3cbc4f3854d2d1c7217a70e25245db8e124bfd72c8fbd689e6b50b3" }, "downloads": -1, "filename": "restkiss-2.0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "c40c23c5cfcd61b2f49172e7696c7e5a", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 22681, "upload_time": "2016-10-15T22:30:13", "url": "https://files.pythonhosted.org/packages/14/7b/78e535b01bd13fc3be3703f4c4c5be2484ff4fca817398d6ee1e344013de/restkiss-2.0.2-py2.py3-none-any.whl" } ] }