{"id":6749,"date":"2023-08-24T07:16:43","date_gmt":"2023-08-24T07:16:43","guid":{"rendered":"https:\/\/www.pythontutorial.net\/?page_id=6749"},"modified":"2023-08-24T07:21:56","modified_gmt":"2023-08-24T07:21:56","slug":"django-rest-framework-pagination","status":"publish","type":"page","link":"https:\/\/www.pythontutorial.net\/django-tutorial\/django-rest-framework-pagination\/","title":{"rendered":"Django REST Framework Pagination"},"content":{"rendered":"\n<p><strong>Summary<\/strong>: in this tutorial, you will learn how to use the Django REST Framework Pagination feature to divide a list of records into multiple pages.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id='introduction-to-django-rest-framework-pagination'>Introduction to Django REST Framework pagination <a href=\"#introduction-to-django-rest-framework-pagination\" class=\"anchor\" id=\"introduction-to-django-rest-framework-pagination\" title=\"Anchor for Introduction to Django REST Framework pagination\">#<\/a><\/h2>\n\n\n\n<p>Suppose you have thousands of records and want to show them to users. But the screen is quite limited. Therefore, you often need to break these records into pages, each containing 5 or 10 records.<\/p>\n\n\n\n<p>The pagination feature allows you to utilize the server resources more efficiently, improve the loading times, and enhance user experiences.<\/p>\n\n\n\n<p>Django REST Framework pagination allows you to split a large result set into individual pages with some simple settings.<\/p>\n\n\n\n<p>We&#8217;ll continue with the Todo API project from the previous tutorial. Let&#8217;s add some todos to the project to test out the pagination:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"459\" height=\"366\" src=\"https:\/\/www.pythontutorial.net\/wp-content\/uploads\/2023\/08\/django-rest-framework-pagination.png\" alt=\"\" class=\"wp-image-6750\" srcset=\"https:\/\/www.pythontutorial.net\/wp-content\/uploads\/2023\/08\/django-rest-framework-pagination.png 459w, https:\/\/www.pythontutorial.net\/wp-content\/uploads\/2023\/08\/django-rest-framework-pagination-300x239.png 300w\" sizes=\"auto, (max-width: 459px) 100vw, 459px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id='django-pagination-styles'>Django Pagination styles <a href=\"#django-pagination-styles\" class=\"anchor\" id=\"django-pagination-styles\" title=\"Anchor for Django Pagination styles\">#<\/a><\/h2>\n\n\n\n<p>Django provides different styles to paginate data. Let&#8217;s explore them.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id='page-number-pagination'>Page number pagination <a href=\"#page-number-pagination\" class=\"anchor\" id=\"page-number-pagination\" title=\"Anchor for Page number pagination\">#<\/a><\/h3>\n\n\n\n<p>The page number pagination style accepts a single page number in the request query parameters. You can jump to specific pages easily.<\/p>\n\n\n\n<p>To configure page number pagination, you add it to the <code>REST_FRAMEWORK<\/code> in the <code>settings.py<\/code> of the project.<\/p>\n\n\n\n<p>For example, the following instructs the DRF to use the <code>PageNumberPagination<\/code> style with a page size of 2:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-1\" data-shcb-language-name=\"Python\" data-shcb-language-slug=\"python\"><span><code class=\"hljs language-python\">REST_FRAMEWORK = {\n    <span class=\"hljs-comment\"># ...<\/span>\n    <span class=\"hljs-string\">'DEFAULT_PAGINATION_CLASS'<\/span>: <span class=\"hljs-string\">'rest_framework.pagination.PageNumberPagination'<\/span>,\n    <span class=\"hljs-string\">'PAGE_SIZE'<\/span>: <span class=\"hljs-number\">10<\/span>,\n}<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-1\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">Python<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">python<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>Once the setup is in place, you can make a <code>GET<\/code> request to the endpoint <code>\/api\/v1\/todos?page=2<\/code> in the web browser.<\/p>\n\n\n\n<p>Here&#8217;s the response:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-2\" data-shcb-language-name=\"Python\" data-shcb-language-slug=\"python\"><span><code class=\"hljs language-python\">HTTP <span class=\"hljs-number\">200<\/span> OK\nAllow: GET, POST, HEAD, OPTIONS\nContent-Type: application\/json\nVary: Accept\n\n{\n    <span class=\"hljs-string\">\"count\"<\/span>: <span class=\"hljs-number\">6<\/span>,\n    <span class=\"hljs-string\">\"next\"<\/span>: <span class=\"hljs-string\">\"http:\/\/localhost:8000\/api\/v1\/todos\/?page=3\"<\/span>,\n    <span class=\"hljs-string\">\"previous\"<\/span>: <span class=\"hljs-string\">\"http:\/\/localhost:8000\/api\/v1\/todos\/\"<\/span>,\n    <span class=\"hljs-string\">\"results\"<\/span>: &#91;\n        {\n            <span class=\"hljs-string\">\"id\"<\/span>: <span class=\"hljs-number\">3<\/span>,\n            <span class=\"hljs-string\">\"title\"<\/span>: <span class=\"hljs-string\">\"Master Django REST API\"<\/span>,\n            <span class=\"hljs-string\">\"completed\"<\/span>: false,\n            <span class=\"hljs-string\">\"user\"<\/span>: <span class=\"hljs-string\">\"john\"<\/span>\n        },\n        {\n            <span class=\"hljs-string\">\"id\"<\/span>: <span class=\"hljs-number\">6<\/span>,\n            <span class=\"hljs-string\">\"title\"<\/span>: <span class=\"hljs-string\">\"Deploy API to Server\"<\/span>,\n            <span class=\"hljs-string\">\"completed\"<\/span>: false,\n            <span class=\"hljs-string\">\"user\"<\/span>: <span class=\"hljs-string\">\"john\"<\/span>\n        }\n    ]\n}<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-2\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">Python<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">python<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>In the response:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>count<\/code> specifies the total records.<\/li>\n\n\n\n<li><code>next<\/code> &amp; <code>previous<\/code> denote the links to the next and previous page.<\/li>\n\n\n\n<li><code>results<\/code> store the records specified by the <code>PAGE_SIZE<\/code>. In this example, each page contains 2 records.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id='limit-offset-pagination'>Limit Offset Pagination <a href=\"#limit-offset-pagination\" class=\"anchor\" id=\"limit-offset-pagination\" title=\"Anchor for Limit Offset Pagination\">#<\/a><\/h3>\n\n\n\n<p>The limit offset pagination simulates the way to search for multiple records in a database. The client tells the server two things:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The maximum number of records to return per page (<code>limit<\/code>).<\/li>\n\n\n\n<li>Where the list begins among the records. (<code>offset<\/code>)<\/li>\n<\/ul>\n\n\n\n<p>If you are familiar with MySQL or PostgreSQL, the limit offset pagination works like the <code>LIMIT<\/code> and <code>OFFSET<\/code> clauses.<\/p>\n\n\n\n<p>The following shows how to configure the limit offset pagination in the <code>settings.py<\/code> of the project:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-3\" data-shcb-language-name=\"Python\" data-shcb-language-slug=\"python\"><span><code class=\"hljs language-python\">REST_FRAMEWORK = {\n     <span class=\"hljs-comment\"># ...<\/span>\n    <span class=\"hljs-string\">'DEFAULT_PAGINATION_CLASS'<\/span>: <span class=\"hljs-string\">'rest_framework.pagination.LimitOffsetPagination'<\/span>,\n    <span class=\"hljs-string\">'PAGE_SIZE'<\/span>: <span class=\"hljs-number\">2<\/span>\n}<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-3\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">Python<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">python<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>If you make a <code>GET<\/code> request to the endpoint <code>\/api\/v1\/todos\/?limit=2&amp;offset=2<\/code>, you&#8217;ll get the following response:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-4\" data-shcb-language-name=\"Python\" data-shcb-language-slug=\"python\"><span><code class=\"hljs language-python\">HTTP <span class=\"hljs-number\">200<\/span> OK\nAllow: GET, POST, HEAD, OPTIONS\nContent-Type: application\/json\nVary: Accept\n\n{\n    <span class=\"hljs-string\">\"count\"<\/span>: <span class=\"hljs-number\">6<\/span>,\n    <span class=\"hljs-string\">\"next\"<\/span>: <span class=\"hljs-string\">\"http:\/\/localhost:8000\/api\/v1\/todos\/?limit=2&amp;offset=4\"<\/span>,\n    <span class=\"hljs-string\">\"previous\"<\/span>: <span class=\"hljs-string\">\"http:\/\/localhost:8000\/api\/v1\/todos\/?limit=2\"<\/span>,\n    <span class=\"hljs-string\">\"results\"<\/span>: &#91;\n        {\n            <span class=\"hljs-string\">\"id\"<\/span>: <span class=\"hljs-number\">3<\/span>,\n            <span class=\"hljs-string\">\"title\"<\/span>: <span class=\"hljs-string\">\"Master Django REST API\"<\/span>,\n            <span class=\"hljs-string\">\"completed\"<\/span>: false,\n            <span class=\"hljs-string\">\"user\"<\/span>: <span class=\"hljs-string\">\"john\"<\/span>\n        },\n        {\n            <span class=\"hljs-string\">\"id\"<\/span>: <span class=\"hljs-number\">6<\/span>,\n            <span class=\"hljs-string\">\"title\"<\/span>: <span class=\"hljs-string\">\"Deploy API to Server\"<\/span>,\n            <span class=\"hljs-string\">\"completed\"<\/span>: false,\n            <span class=\"hljs-string\">\"user\"<\/span>: <span class=\"hljs-string\">\"john\"<\/span>\n        }\n    ]\n}<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-4\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">Python<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">python<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>The <code>LimitOffsetPagination<\/code> style works like the <code>PageNumberPagination<\/code> style except that it uses two query string parameters limit and offset.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id='cursor-pagination'>Cursor Pagination <a href=\"#cursor-pagination\" class=\"anchor\" id=\"cursor-pagination\" title=\"Anchor for Cursor Pagination\">#<\/a><\/h3>\n\n\n\n<p>The limitation of the offset-based including <code>PageNumberPagination<\/code> and <code>LimitOffsetPagination<\/code> is that they are not efficient for extremely large datasets. <\/p>\n\n\n\n<p>This is where the cursor pagination comes to the rescue. The cursor pagination works efficiently for large datasets.<\/p>\n\n\n\n<p>The cursor pagination uses an opaque &#8220;cursor&#8221; indicator for paging. It offers forward and reverse controls for navigation. <\/p>\n\n\n\n<p>The cursor pagination requires a consistent and unique order in the result set. It also doesn&#8217;t allow jumping to an arbitrary position in the data set.<\/p>\n\n\n\n<p>The following shows the settings of the <code>CursorPagination<\/code> in the <code>settings.py<\/code> file:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-5\" data-shcb-language-name=\"Python\" data-shcb-language-slug=\"python\"><span><code class=\"hljs language-python\">REST_FRAMEWORK = {\n    <span class=\"hljs-comment\"># ...<\/span>\n    <span class=\"hljs-string\">'DEFAULT_PAGINATION_CLASS'<\/span>: <span class=\"hljs-string\">'rest_framework.pagination.CursorPagination'<\/span>,\n    <span class=\"hljs-string\">'PAGE_SIZE'<\/span>: <span class=\"hljs-number\">2<\/span>\n}<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-5\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">Python<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">python<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>By default, the <code>CursorPagination<\/code> assumes that the model has the &#8220;<code>created<\/code>&#8221; timestamp field. It&#8217;ll return the most recently created records first because the default order is <code>\"-created\"<\/code>.<\/p>\n\n\n\n<p>If the model doesn&#8217;t have the &#8220;<code>created<\/code>&#8221; field, you need to specify another field such as <code>id<\/code>.  To do that, you follow these steps:<\/p>\n\n\n\n<p>First, define a subclass of the <code>CursorPagination<\/code> class:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-6\" data-shcb-language-name=\"Python\" data-shcb-language-slug=\"python\"><span><code class=\"hljs language-python\"><span class=\"hljs-class\"><span class=\"hljs-keyword\">class<\/span> <span class=\"hljs-title\">TodoCursorPagination<\/span><span class=\"hljs-params\">(CursorPagination)<\/span>:<\/span>\n    ordering = <span class=\"hljs-string\">'id'<\/span>  <span class=\"hljs-comment\"># Default ordering<\/span>\n    page_size = <span class=\"hljs-number\">2<\/span>   <span class=\"hljs-comment\"># Set your desired page size<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-6\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">Python<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">python<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>Second, use the <code>TodoCursorPagination<\/code> in the view:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-7\" data-shcb-language-name=\"Python\" data-shcb-language-slug=\"python\"><span><code class=\"hljs language-python\"><span class=\"hljs-class\"><span class=\"hljs-keyword\">class<\/span> <span class=\"hljs-title\">TodoList<\/span><span class=\"hljs-params\">(generics.ListCreateAPIView)<\/span>:<\/span>\n    pagination_class = TodoCursorPagination\n    <span class=\"hljs-comment\"># ...<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-7\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">Python<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">python<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>This example shows how to configure the pagination style at the view level. Unlike the global setting, the setting at the view level is only applied to a specific view.<\/p>\n\n\n\n<p>If you make a <code>GET<\/code> request to the API endpoint <code>\/api\/v1\/todos\/<\/code>, you&#8217;ll get the following response:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-8\" data-shcb-language-name=\"Python\" data-shcb-language-slug=\"python\"><span><code class=\"hljs language-python\">HTTP <span class=\"hljs-number\">200<\/span> OK\nAllow: GET, POST, HEAD, OPTIONS\nContent-Type: application\/json\nVary: Accept\n\n{\n    <span class=\"hljs-string\">\"next\"<\/span>: <span class=\"hljs-string\">\"http:\/\/localhost:8000\/api\/v1\/todos\/?cursor=cD0y\"<\/span>,\n    <span class=\"hljs-string\">\"previous\"<\/span>: null,\n    <span class=\"hljs-string\">\"results\"<\/span>: &#91;\n        {\n            <span class=\"hljs-string\">\"id\"<\/span>: <span class=\"hljs-number\">1<\/span>,\n            <span class=\"hljs-string\">\"title\"<\/span>: <span class=\"hljs-string\">\"Learn Python\"<\/span>,\n            <span class=\"hljs-string\">\"completed\"<\/span>: false,\n            <span class=\"hljs-string\">\"user\"<\/span>: <span class=\"hljs-string\">\"john\"<\/span>\n        },\n        {\n            <span class=\"hljs-string\">\"id\"<\/span>: <span class=\"hljs-number\">2<\/span>,\n            <span class=\"hljs-string\">\"title\"<\/span>: <span class=\"hljs-string\">\"Study Django\"<\/span>,\n            <span class=\"hljs-string\">\"completed\"<\/span>: false,\n            <span class=\"hljs-string\">\"user\"<\/span>: <span class=\"hljs-string\">\"john\"<\/span>\n        }\n    ]\n}<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-8\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">Python<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">python<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<h2 class=\"wp-block-heading\" id='download-the-project-source-code'>Download the project source code <a href=\"#download-the-project-source-code\" class=\"anchor\" id=\"download-the-project-source-code\" title=\"Anchor for Download the project source code\">#<\/a><\/h2>\n\n\n\n<p><a href=\"https:\/\/www.pythontutorial.net\/wp-content\/uploads\/2023\/08\/todolist5.zip\">Click the following link to download the project source code<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id='summary'>Summary <a href=\"#summary\" class=\"anchor\" id=\"summary\" title=\"Anchor for Summary\">#<\/a><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Django REST Framework allows you to set the pagination style at the global and view levels.<\/li>\n\n\n\n<li>Django REST Framework offers three pagination styles including page number pagination, limit offset pagination, and cursor pagination.<\/li>\n\n\n\n<li>The <code>CursorPagination<\/code> works very efficiently with extremely large datasets.<\/li>\n<\/ul>\n<div class=\"helpful-block-content\" data-title=\"\">\n\t<header>\n\t\t<div class=\"wth-question\">Was this tutorial helpful ?<\/div>\n\t\t<div class=\"wth-thumbs\">\n\t\t\t<button\n\t\t\t\tdata-post=\"6749\"\n\t\t\t\tdata-post-url=\"https:\/\/www.pythontutorial.net\/django-tutorial\/django-rest-framework-pagination\/\"\n\t\t\t\tdata-post-title=\"Django REST Framework Pagination\"\n\t\t\t\tdata-response=\"1\"\n\t\t\t\tclass=\"wth-btn-rounded wth-yes-btn\"\n\t\t\t>\n\t\t\t\t<svg\n\t\t\t\t\txmlns=\"http:\/\/www.w3.org\/2000\/svg\"\n\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\tfill=\"none\"\n\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\tstroke-linejoin=\"round\"\n\t\t\t\t\tclass=\"feather feather-thumbs-up block w-full h-full\"\n\t\t\t\t>\n\t\t\t\t\t<path\n\t\t\t\t\t\td=\"M14 9V5a3 3 0 0 0-3-3l-4 9v11h11.28a2 2 0 0 0 2-1.7l1.38-9a2 2 0 0 0-2-2.3zM7 22H4a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h3\"\n\t\t\t\t\t><\/path>\n\t\t\t\t<\/svg>\n\t\t\t\t<span class=\"sr-only\"> Yes <\/span>\n\t\t\t<\/button>\n\n\t\t\t<button\n\t\t\t\tdata-response=\"0\"\n\t\t\t\tdata-post=\"6749\"\n\t\t\t\tdata-post-url=\"https:\/\/www.pythontutorial.net\/django-tutorial\/django-rest-framework-pagination\/\"\n\t\t\t\tdata-post-title=\"Django REST Framework Pagination\"\n\t\t\t\tclass=\"wth-btn-rounded wth-no-btn\"\n\t\t\t>\n\t\t\t\t<svg\n\t\t\t\t\txmlns=\"http:\/\/www.w3.org\/2000\/svg\"\n\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\tfill=\"none\"\n\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\tstroke-linejoin=\"round\"\n\t\t\t\t>\n\t\t\t\t\t<path\n\t\t\t\t\t\td=\"M10 15v4a3 3 0 0 0 3 3l4-9V2H5.72a2 2 0 0 0-2 1.7l-1.38 9a2 2 0 0 0 2 2.3zm7-13h2.67A2.31 2.31 0 0 1 22 4v7a2.31 2.31 0 0 1-2.33 2H17\"\n\t\t\t\t\t><\/path>\n\t\t\t\t<\/svg>\n\t\t\t\t<span class=\"sr-only\"> No <\/span>\n\t\t\t<\/button>\n\t\t<\/div>\n\t<\/header>\n\n\t<div class=\"wth-form hidden\">\n\t\t<div class=\"wth-form-wrapper\">\n\t\t\t<div class=\"wth-title\"><\/div>\n\t\t\t<textarea class=\"wth-message\"><\/textarea>\n\t\t\t<input type=\"button\" name=\"wth-submit\" class=\"wth-btn wth-btn-submit\" id=\"wth-submit\" \/>\n\t\t\t<input type=\"button\" class=\"wth-btn wth-btn-cancel\" value=\"Cancel\" \/>\n\t\t<\/div>\n\t<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>In this tutorial, you will learn how to use the Django REST Framework Pagination feature to divide a list of records into multiple pages.<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":5531,"menu_order":42,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-6749","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.pythontutorial.net\/wp-json\/wp\/v2\/pages\/6749","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.pythontutorial.net\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.pythontutorial.net\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.pythontutorial.net\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.pythontutorial.net\/wp-json\/wp\/v2\/comments?post=6749"}],"version-history":[{"count":0,"href":"https:\/\/www.pythontutorial.net\/wp-json\/wp\/v2\/pages\/6749\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/www.pythontutorial.net\/wp-json\/wp\/v2\/pages\/5531"}],"wp:attachment":[{"href":"https:\/\/www.pythontutorial.net\/wp-json\/wp\/v2\/media?parent=6749"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}