{ "info": { "author": "Tom Christie", "author_email": "tom@tomchristie.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Framework :: Django", "Framework :: Django :: 1.11", "Framework :: Django :: 2.0", "Framework :: Django :: 2.1", "Framework :: Django :: 2.2", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Internet :: WWW/HTTP" ], "description": "# [Django REST framework][docs]\n\n[![build-status-image]][travis]\n[![coverage-status-image]][codecov]\n[![pypi-version]][pypi]\n\n**Awesome web-browsable Web APIs.**\n\nFull documentation for the project is available at [https://www.django-rest-framework.org/][docs].\n\n---\n\n# Funding\n\nREST framework is a *collaboratively funded project*. If you use\nREST framework commercially we strongly encourage you to invest in its\ncontinued development by [signing up for a paid plan][funding].\n\nThe initial aim is to provide a single full-time position on REST framework.\n*Every single sign-up makes a significant impact towards making that possible.*\n\n[![][sentry-img]][sentry-url]\n[![][stream-img]][stream-url]\n[![][rollbar-img]][rollbar-url]\n[![][cadre-img]][cadre-url]\n[![][kloudless-img]][kloudless-url]\n[![][release-history-img]][release-history-url]\n[![][lightson-img]][lightson-url]\n\nMany thanks to all our [wonderful sponsors][sponsors], and in particular to our premium backers, [Sentry][sentry-url], [Stream][stream-url], [Rollbar][rollbar-url], [Cadre][cadre-url], [Kloudless][kloudless-url], [Release History][release-history-url], and [Lights On Software][lightson-url].\n\n---\n\n# Overview\n\nDjango REST framework is a powerful and flexible toolkit for building Web APIs.\n\nSome reasons you might want to use REST framework:\n\n* The [Web browsable API][sandbox] is a huge usability win for your developers.\n* [Authentication policies][authentication] including optional packages for [OAuth1a][oauth1-section] and [OAuth2][oauth2-section].\n* [Serialization][serializers] that supports both [ORM][modelserializer-section] and [non-ORM][serializer-section] data sources.\n* Customizable all the way down - just use [regular function-based views][functionview-section] if you don't need the [more][generic-views] [powerful][viewsets] [features][routers].\n* [Extensive documentation][docs], and [great community support][group].\n\nThere is a live example API for testing purposes, [available here][sandbox].\n\n**Below**: *Screenshot from the browsable API*\n\n![Screenshot][image]\n\n----\n\n# Requirements\n\n* Python (2.7, 3.4, 3.5, 3.6, 3.7)\n* Django (1.11, 2.0, 2.1, 2.2)\n\nWe **highly recommend** and only officially support the latest patch release of\neach Python and Django series.\n\n# Installation\n\nInstall using `pip`...\n\n pip install djangorestframework\n\nAdd `'rest_framework'` to your `INSTALLED_APPS` setting.\n\n INSTALLED_APPS = (\n ...\n 'rest_framework',\n )\n\n# Example\n\nLet's take a look at a quick example of using REST framework to build a simple model-backed API for accessing users and groups.\n\nStartup up a new project like so...\n\n pip install django\n pip install djangorestframework\n django-admin startproject example .\n ./manage.py migrate\n ./manage.py createsuperuser\n\n\nNow edit the `example/urls.py` module in your project:\n\n```python\nfrom django.conf.urls import url, include\nfrom django.contrib.auth.models import User\nfrom rest_framework import serializers, viewsets, routers\n\n# Serializers define the API representation.\nclass UserSerializer(serializers.HyperlinkedModelSerializer):\n class Meta:\n model = User\n fields = ('url', 'username', 'email', 'is_staff')\n\n\n# ViewSets define the view behavior.\nclass UserViewSet(viewsets.ModelViewSet):\n queryset = User.objects.all()\n serializer_class = UserSerializer\n\n\n# Routers provide a way of automatically determining the URL conf.\nrouter = routers.DefaultRouter()\nrouter.register(r'users', UserViewSet)\n\n\n# Wire up our API using automatic URL routing.\n# Additionally, we include login URLs for the browsable API.\nurlpatterns = [\n url(r'^', include(router.urls)),\n url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework'))\n]\n```\n\nWe'd also like to configure a couple of settings for our API.\n\nAdd the following to your `settings.py` module:\n\n```python\nINSTALLED_APPS = (\n ... # Make sure to include the default installed apps here.\n 'rest_framework',\n)\n\nREST_FRAMEWORK = {\n # Use Django's standard `django.contrib.auth` permissions,\n # or allow read-only access for unauthenticated users.\n 'DEFAULT_PERMISSION_CLASSES': [\n 'rest_framework.permissions.DjangoModelPermissionsOrAnonReadOnly'\n ]\n}\n```\n\nThat's it, we're done!\n\n ./manage.py runserver\n\nYou can now open the API in your browser at `http://127.0.0.1:8000/`, and view your new 'users' API. If you use the `Login` control in the top right corner you'll also be able to add, create and delete users from the system.\n\nYou can also interact with the API using command line tools such as [`curl`](https://curl.haxx.se/). For example, to list the users endpoint:\n\n $ curl -H 'Accept: application/json; indent=4' -u admin:password http://127.0.0.1:8000/users/\n [\n {\n \"url\": \"http://127.0.0.1:8000/users/1/\",\n \"username\": \"admin\",\n \"email\": \"admin@example.com\",\n \"is_staff\": true,\n }\n ]\n\nOr to create a new user:\n\n $ curl -X POST -d username=new -d email=new@example.com -d is_staff=false -H 'Accept: application/json; indent=4' -u admin:password http://127.0.0.1:8000/users/\n {\n \"url\": \"http://127.0.0.1:8000/users/2/\",\n \"username\": \"new\",\n \"email\": \"new@example.com\",\n \"is_staff\": false,\n }\n\n# Documentation & Support\n\nFull documentation for the project is available at [https://www.django-rest-framework.org/][docs].\n\nFor questions and support, use the [REST framework discussion group][group], or `#restframework` on freenode IRC.\n\nYou may also want to [follow the author on Twitter][twitter].\n\n# Security\n\nIf you believe you've found something in Django REST framework which has security implications, please **do not raise the issue in a public forum**.\n\nSend a description of the issue via email to [rest-framework-security@googlegroups.com][security-mail]. The project maintainers will then work with you to resolve any issues where required, prior to any public disclosure.\n\n[build-status-image]: https://secure.travis-ci.org/encode/django-rest-framework.svg?branch=master\n[travis]: https://travis-ci.org/encode/django-rest-framework?branch=master\n[coverage-status-image]: https://img.shields.io/codecov/c/github/encode/django-rest-framework/master.svg\n[codecov]: https://codecov.io/github/encode/django-rest-framework?branch=master\n[pypi-version]: https://img.shields.io/pypi/v/djangorestframework.svg\n[pypi]: https://pypi.org/project/djangorestframework/\n[twitter]: https://twitter.com/_tomchristie\n[group]: https://groups.google.com/forum/?fromgroups#!forum/django-rest-framework\n[sandbox]: https://restframework.herokuapp.com/\n\n[funding]: https://fund.django-rest-framework.org/topics/funding/\n[sponsors]: https://fund.django-rest-framework.org/topics/funding/#our-sponsors\n\n[rover-img]: https://raw.githubusercontent.com/encode/django-rest-framework/master/docs/img/premium/rover-readme.png\n[sentry-img]: https://raw.githubusercontent.com/encode/django-rest-framework/master/docs/img/premium/sentry-readme.png\n[stream-img]: https://raw.githubusercontent.com/encode/django-rest-framework/master/docs/img/premium/stream-readme.png\n[rollbar-img]: https://raw.githubusercontent.com/encode/django-rest-framework/master/docs/img/premium/rollbar-readme.png\n[cadre-img]: https://raw.githubusercontent.com/encode/django-rest-framework/master/docs/img/premium/cadre-readme.png\n[load-impact-img]: https://raw.githubusercontent.com/encode/django-rest-framework/master/docs/img/premium/load-impact-readme.png\n[kloudless-img]: https://raw.githubusercontent.com/encode/django-rest-framework/master/docs/img/premium/kloudless-readme.png\n[release-history-img]: https://raw.githubusercontent.com/encode/django-rest-framework/master/docs/img/premium/release-history.png\n[lightson-img]: https://raw.githubusercontent.com/encode/django-rest-framework/master/docs/img/premium/lightson-readme.png\n\n[rover-url]: http://jobs.rover.com/\n[sentry-url]: https://getsentry.com/welcome/\n[stream-url]: https://getstream.io/try-the-api/?utm_source=drf&utm_medium=banner&utm_campaign=drf\n[rollbar-url]: https://rollbar.com/\n[cadre-url]: https://cadre.com/\n[load-impact-url]: https://loadimpact.com/?utm_campaign=Sponsorship%20links&utm_source=drf&utm_medium=drf\n[kloudless-url]: https://hubs.ly/H0f30Lf0\n[release-history-url]: https://releasehistory.io\n[lightson-url]: https://lightsonsoftware.com\n\n[oauth1-section]: https://www.django-rest-framework.org/api-guide/authentication/#django-rest-framework-oauth\n[oauth2-section]: https://www.django-rest-framework.org/api-guide/authentication/#django-oauth-toolkit\n[serializer-section]: https://www.django-rest-framework.org/api-guide/serializers/#serializers\n[modelserializer-section]: https://www.django-rest-framework.org/api-guide/serializers/#modelserializer\n[functionview-section]: https://www.django-rest-framework.org/api-guide/views/#function-based-views\n[generic-views]: https://www.django-rest-framework.org/api-guide/generic-views/\n[viewsets]: https://www.django-rest-framework.org/api-guide/viewsets/\n[routers]: https://www.django-rest-framework.org/api-guide/routers/\n[serializers]: https://www.django-rest-framework.org/api-guide/serializers/\n[authentication]: https://www.django-rest-framework.org/api-guide/authentication/\n[image]: https://www.django-rest-framework.org/img/quickstart.png\n\n[docs]: https://www.django-rest-framework.org/\n[security-mail]: mailto:rest-framework-security@googlegroups.com\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://www.django-rest-framework.org/", "keywords": "", "license": "BSD", "maintainer": "", "maintainer_email": "", "name": "djangorestframework42", "package_url": "https://pypi.org/project/djangorestframework42/", "platform": "", "project_url": "https://pypi.org/project/djangorestframework42/", "project_urls": { "Homepage": "https://www.django-rest-framework.org/" }, "release_url": "https://pypi.org/project/djangorestframework42/3.9.2.2/", "requires_dist": null, "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "summary": "Web APIs for Django, made easy.", "version": "3.9.2.2" }, "last_serial": 5136691, "releases": { "3.9.2": [ { "comment_text": "", "digests": { "md5": "9480f6041e28b78fe085c4665c3f14da", "sha256": "f9fbe5fabac95f7fe5ce55ecb204457173d4c9d30555ebee06f02835e639b771" }, "downloads": -1, "filename": "djangorestframework42-3.9.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "9480f6041e28b78fe085c4665c3f14da", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "size": 907661, "upload_time": "2019-04-08T01:08:27", "url": "https://files.pythonhosted.org/packages/84/a0/d0762c76a0f1500d29949af4320d1b3db53fb141a368f867bd9715ab39ab/djangorestframework42-3.9.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "aecdb7fabfbf4e62288ab277ddda02ed", "sha256": "03ece164e6e608ad76fabbe215e57d22097c89aba98e863afacd08f1d11553ae" }, "downloads": -1, "filename": "djangorestframework42-3.9.2.tar.gz", "has_sig": false, "md5_digest": "aecdb7fabfbf4e62288ab277ddda02ed", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "size": 789664, "upload_time": "2019-04-08T01:08:30", "url": "https://files.pythonhosted.org/packages/af/d2/78812b7c12fdaf36f5d0f6fad9bbffebad47fafd00f2312ce9489dad255b/djangorestframework42-3.9.2.tar.gz" } ], "3.9.2.1": [ { "comment_text": "", "digests": { "md5": "f556c2dd2c1753581d75b53b9520798b", "sha256": "d5a60c6476703bbe9fad3308641bed0fe3447910edf410e6a2c56af9524bf254" }, "downloads": -1, "filename": "djangorestframework42-3.9.2.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "f556c2dd2c1753581d75b53b9520798b", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "size": 907687, "upload_time": "2019-04-12T00:24:30", "url": "https://files.pythonhosted.org/packages/06/de/434be928db0d727c96ff6c1fd2bb03e13d822206ac4d5161b33a6594d784/djangorestframework42-3.9.2.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b03efc7f5ee4e7f152ad147056b7d4de", "sha256": "c045d4dbbcb2421e85f33700e569453e62f02c013fb9ef23686b85796cfc610d" }, "downloads": -1, "filename": "djangorestframework42-3.9.2.1.tar.gz", "has_sig": false, "md5_digest": "b03efc7f5ee4e7f152ad147056b7d4de", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "size": 789982, "upload_time": "2019-04-12T00:24:45", "url": "https://files.pythonhosted.org/packages/78/1c/3729c0a34ab579f2eca88b58c4c81ec2a9bfe3aed531fd426d71b4440d95/djangorestframework42-3.9.2.1.tar.gz" } ], "3.9.2.2": [ { "comment_text": "", "digests": { "md5": "ba548677ac3fab84cce53e8762b393f9", "sha256": "348224d0ad2fde1bb2655bdb43f16ae9d7dcabc18b5f38fc38c1e64eff29c325" }, "downloads": -1, "filename": "djangorestframework42-3.9.2.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "ba548677ac3fab84cce53e8762b393f9", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "size": 907611, "upload_time": "2019-04-13T03:18:48", "url": "https://files.pythonhosted.org/packages/e8/4b/c0413de9da34294623614e4bae7c83eaf20003cfc14481937849f0cb4324/djangorestframework42-3.9.2.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "cd58282a5f8b40bdac6191d4bef6b9f3", "sha256": "79ec06ffa14f13d1dec976e58df7dc3efee844eb381ff759b3650e2c92a94caf" }, "downloads": -1, "filename": "djangorestframework42-3.9.2.2.tar.gz", "has_sig": false, "md5_digest": "cd58282a5f8b40bdac6191d4bef6b9f3", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "size": 789920, "upload_time": "2019-04-13T03:19:00", "url": "https://files.pythonhosted.org/packages/6c/52/d1d395159c0b76fddfc5fdd2b9cebda45de40db7f8607d1f60d374d7c203/djangorestframework42-3.9.2.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ba548677ac3fab84cce53e8762b393f9", "sha256": "348224d0ad2fde1bb2655bdb43f16ae9d7dcabc18b5f38fc38c1e64eff29c325" }, "downloads": -1, "filename": "djangorestframework42-3.9.2.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "ba548677ac3fab84cce53e8762b393f9", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "size": 907611, "upload_time": "2019-04-13T03:18:48", "url": "https://files.pythonhosted.org/packages/e8/4b/c0413de9da34294623614e4bae7c83eaf20003cfc14481937849f0cb4324/djangorestframework42-3.9.2.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "cd58282a5f8b40bdac6191d4bef6b9f3", "sha256": "79ec06ffa14f13d1dec976e58df7dc3efee844eb381ff759b3650e2c92a94caf" }, "downloads": -1, "filename": "djangorestframework42-3.9.2.2.tar.gz", "has_sig": false, "md5_digest": "cd58282a5f8b40bdac6191d4bef6b9f3", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "size": 789920, "upload_time": "2019-04-13T03:19:00", "url": "https://files.pythonhosted.org/packages/6c/52/d1d395159c0b76fddfc5fdd2b9cebda45de40db7f8607d1f60d374d7c203/djangorestframework42-3.9.2.2.tar.gz" } ] }