{ "info": { "author": "Rory Geoghegan", "author_email": "rory.geoghegan@ecometrica.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Framework :: Django", "License :: OSI Approved :: BSD License", "Operating System :: POSIX", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Topic :: Software Development :: Internationalization" ], "description": "===============================\ndjango-wapiti generic api layer\n===============================\n\nabout\n=====\n\nDjango-wapiti is a generic API layer that can be added to any django project\nto allow other applications to get access to its models and methods very easily\nthrough JSON.\n\nIt is being developped by Ecometrica_ and made open source under a BSD license.\n\nstatus\n~~~~~~\n\nDjango-wapiti is still under development. What works currently:\n\n* enabling the api for a given model\n* accessing objects by id\n* searching for objects through any of its fields, using any of the django\n queryset field matching operators (``exact``, ``iexact``, ``contains``, ...)\n* auto-complete call allows frontend code to easily auto-complete user-entered\n data; it will search for objects through different fields\n* the ModelApi class, like ModelAdmin class for the django admin, is how you \n define the behavior an object should have through the API\n* instance methods are supported: simply decorate the method to make it available\n* class methods are also supported in the same manner\n* API keys\n* limiting requests per-{ip,session,user,apikey} per-{hour,day,month,year,ever}\n per-{http method, object, type, method}\n* slicing of results - add slice_left and slice_right parameters to your request to\n slice the results\n * the default max slice size is 100, override with settings.WAPITI_MAX_SLICE_SIZE\n\n\nshort-term plan\n~~~~~~~~~~~~~~~\n\nBecause we need the following functionality, it likely will be incorporated \nsoonish:\n\n* better method for defining the permissions for a given API key\n* user authentication (OAuth or otherwise) and row-level permissions\n* call logging (for quota and throttling enforcement)\n* api introspection: /api/VER/ should return a json (or XML) representation of\n the currently registered models and calls\n\nknown bugs\n~~~~~~~~~~\n\n* the JSON decoder will interpret both 2010-12-31 and \"2010-12-31\" as a date; it\n should interpret the latter as a string\n\nusage\n=====\n\n#. install django-wapiti. the easiest way might be to use::\n \n pip install git+http://git@github.com/ecometrica/django-wapiti.git#egg=django-wapiti\n\n#. wapiti requires the decorator module to function::\n \n pip install decorator\n\n#. add ``wapiti`` to your INSTALLED_APPS in the settings.py file of your django\n project\n\n#. call wapiti.helpers.register_models from somewhere, usually your urls.py, to\n register your api models and methods\n\n#. to make the model class Foo from the app fooapp available through the API, \n create a file ``fooapp/api.py`` with this content::\n\n from wapiti.helpers import register\n from wapiti.modelapi import ModelApi\n\n from fooapp.models import Foo\n\n class FooApi(ModelApi):\n auto_complete_fields = ('name', 'description')\n auto_complete_order_by = 'name'\n model = Foo\n\n register('foo', FooApi)\n \n We've made the auto_complete method work by automatically searching for Foo\n objects with a case-insensitive search on the fields name and description\n (which therefore must exist in the Foo model definition).\n \n See the file ``wapiti/modelapi.py`` for a list of all options available in \n the ModelApi class for a given model.\n\n#. At this point, all objects of type Foo are available through the API at \n ``/api/1.0/foo/``. To make an instance method available for calling through \n the API, apply the ``wapiti.helpers.api_method`` decorator to it. To call\n foo_method on the Foo object with ID 3, you would \n ``GET /api/1.0/foo/3/foo_method``\n\n#. Similarly, for a class method, just decorate it with that same ``api_method``, \n but apply the python ``classmethod`` decorator *above* it as well. To call\n the foo_cls_method on Foo through the API you would then\n ``GET /api/1.0/foo/foo_cls_method``\n\n#. To make calls through the API, you'll need API keys. From the main django\n admin interface, click on ``Add APIKey``, add a name, and add a permission \n with resource_regex ``.*`` on method ``GET``. All API calls need to have a \n ``k=THEAPIKEY`` parameter with a valid and active API key.\n\n#. All calls through JSON must have all their parameters be proper JSON! This \n means that to pass a string argument to a method, it needs to be surrounded\n by double-quotes! See the JSON_ spec for details.\n\n#. In order to use per-IP limiting, we need the REMOTE_ADDR variable. If you're\n using nginx, this needs to be in the proper ``location`` section: ::\n\n fastcgi_param REMOTE_ADDR $remote_addr;\n \nRelease Notes\n=============\n\nv0.0.1\n~~~~~~\n\n* Initial version\n\nv0.0.2\n~~~~~~\n \n* Slicing of results\n* Compatible with Django 1.4 to 1.6 \n\nv0.0.3\n~~~~~~\n\n* post-South migrations\n* Compatible with Django 1.7 to 1.9\n\nv1.0.0\n~~~~~~\n\n* Compatible with Django 1.8 and 1.9 (no longer compatible with Django =< 1.7)\n\nv1.0.1\n~~~~~~\n\n* File handler now only takes field to better support non-FileSystemStorage\n files. Old way is still supported, but deprecated.\n\nv1.0.2\n~~~~~~\n\n* Previous version forgot to handle the case of no file handler being\n supplied. This release fixes that.\n\nv1.0.3\n~~~~~~\n\n* Allow serialising pre-1900 dates.\n\n.. _Ecometrica: http://ecometrica.com\n.. _JSON: http://json.org", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/ecometrica/django-wapiti/", "keywords": "django,api", "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "django-wapiti", "package_url": "https://pypi.org/project/django-wapiti/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-wapiti/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/ecometrica/django-wapiti/" }, "release_url": "https://pypi.org/project/django-wapiti/1.0.3/", "requires_dist": null, "requires_python": null, "summary": "Django API layer", "version": "1.0.3" }, "last_serial": 2825535, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "f88f28605863c7cbf5026698daaf2795", "sha256": "d0a37dc790c60bafb83c696ee5e0759346f5e201a23c7c5309594d9dcdc8446b" }, "downloads": -1, "filename": "django-wapiti-0.0.1.tar.gz", "has_sig": false, "md5_digest": "f88f28605863c7cbf5026698daaf2795", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19785, "upload_time": "2013-12-18T19:41:24", "url": "https://files.pythonhosted.org/packages/3b/df/8dd2bb03736c2de3c33058757193a0b7d17a72aab32e5c94228511889adf/django-wapiti-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "75e5514555643317788e3031cf911b30", "sha256": "80c4725670f01dd1865869b86a311001ae85982ff639dd91a619749cce9e4a97" }, "downloads": -1, "filename": "django-wapiti-0.0.2.tar.gz", "has_sig": false, "md5_digest": "75e5514555643317788e3031cf911b30", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18651, "upload_time": "2014-04-04T16:59:36", "url": "https://files.pythonhosted.org/packages/c8/a4/a4ad69620c62cd63b04e714342ecb37934519a3904d419bf4c844c0f16a4/django-wapiti-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "c75eaa13c94947d989c15a5b9250ae04", "sha256": "c1282ae81ab9423513093b8ff7739e5999056d46e3b3da10c5ffb8a2b691cfe6" }, "downloads": -1, "filename": "django_wapiti-0.0.3-py2-none-any.whl", "has_sig": false, "md5_digest": "c75eaa13c94947d989c15a5b9250ae04", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 32442, "upload_time": "2016-01-18T20:50:24", "url": "https://files.pythonhosted.org/packages/f2/ae/9546bb3f97fbb13f4d22bf0a9f5dcca1c21ed45ce2c2a08f5471edf922e0/django_wapiti-0.0.3-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1d3963e8cf2b0949173342867df56f5e", "sha256": "ca5fdede2b05a01e6c903cb68d87b17035f159f0761906b5db0654a031ddc5c8" }, "downloads": -1, "filename": "django-wapiti-0.0.3.tar.gz", "has_sig": false, "md5_digest": "1d3963e8cf2b0949173342867df56f5e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19132, "upload_time": "2016-01-18T20:49:59", "url": "https://files.pythonhosted.org/packages/5a/1f/e4f1821646f66c2a1545fa41543b2b2921fe67c047b1e825525aa1e8158a/django-wapiti-0.0.3.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "13aa8110d804e1427ec4b30df8b39c37", "sha256": "c729ae5f4fd9d44101a6fd1f647d326c22cb759ff3966c41fb24fd7627a012d1" }, "downloads": -1, "filename": "django-wapiti-1.0.0.tar.gz", "has_sig": false, "md5_digest": "13aa8110d804e1427ec4b30df8b39c37", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19510, "upload_time": "2016-01-20T19:44:37", "url": "https://files.pythonhosted.org/packages/c1/12/38c50212830811b8146610194e88450d291532f994a34cd2651dc08c5999/django-wapiti-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "94a8f7cc757941906edce69fdcdbe3c2", "sha256": "328a701dc1368a8a83002338e15611f042a9baea5d25305f817c52f1b7f4adc2" }, "downloads": -1, "filename": "django-wapiti-1.0.1.tar.gz", "has_sig": false, "md5_digest": "94a8f7cc757941906edce69fdcdbe3c2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19724, "upload_time": "2016-03-22T14:17:38", "url": "https://files.pythonhosted.org/packages/f9/ef/8276e78d0cafe7d79c24e276b91f632c55069bb6ea2d89c862e40945c8d2/django-wapiti-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "9a88d59fde43422862fb884bd6857a8c", "sha256": "af37686e9902af809051d39f75d31796cb8b3fc54d2c0589e0c6730b2e185ff2" }, "downloads": -1, "filename": "django-wapiti-1.0.2.tar.gz", "has_sig": false, "md5_digest": "9a88d59fde43422862fb884bd6857a8c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19612, "upload_time": "2016-03-22T19:39:28", "url": "https://files.pythonhosted.org/packages/98/61/c7c315162f22ec0c9359d2997e5d20e613a4f5b2da98acd851a317575ca8/django-wapiti-1.0.2.tar.gz" } ], "1.0.3": [ { "comment_text": "", "digests": { "md5": "c14a0e7fc29191e263eea40c40b1837e", "sha256": "5de26aee3ea4adf96c03b8170c9b78ad5ccd84cc43407bef882ff0db7b37093f" }, "downloads": -1, "filename": "django-wapiti-1.0.3.tar.gz", "has_sig": false, "md5_digest": "c14a0e7fc29191e263eea40c40b1837e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19814, "upload_time": "2016-04-07T17:54:31", "url": "https://files.pythonhosted.org/packages/bd/d5/0f74589cdad35e505ba9ab9913355ee2942f95bf410892b0941c42b53948/django-wapiti-1.0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c14a0e7fc29191e263eea40c40b1837e", "sha256": "5de26aee3ea4adf96c03b8170c9b78ad5ccd84cc43407bef882ff0db7b37093f" }, "downloads": -1, "filename": "django-wapiti-1.0.3.tar.gz", "has_sig": false, "md5_digest": "c14a0e7fc29191e263eea40c40b1837e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19814, "upload_time": "2016-04-07T17:54:31", "url": "https://files.pythonhosted.org/packages/bd/d5/0f74589cdad35e505ba9ab9913355ee2942f95bf410892b0941c42b53948/django-wapiti-1.0.3.tar.gz" } ] }