{"id":531,"date":"2020-10-14T02:25:15","date_gmt":"2020-10-14T02:25:15","guid":{"rendered":"https:\/\/www.pythontutorial.net\/?page_id=531"},"modified":"2025-03-30T10:12:38","modified_gmt":"2025-03-30T10:12:38","slug":"python-packages","status":"publish","type":"page","link":"https:\/\/www.pythontutorial.net\/python-basics\/python-packages\/","title":{"rendered":"Python Packages"},"content":{"rendered":"\n<p><strong>Summary<\/strong>: in this tutorial, you learn about the Python packages and how to use them to structure your application.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id='introduction-to-python-packages'>Introduction to Python packages <a href=\"#introduction-to-python-packages\" class=\"anchor\" id=\"introduction-to-python-packages\" title=\"Anchor for Introduction to Python packages\">#<\/a><\/h2>\n\n\n\n<p>Suppose that you need to develop a large application that handles the sales process from order to cash.<\/p>\n\n\n\n<p>The application will have many <a href=\"https:\/\/www.pythontutorial.net\/python-basics\/python-module\/\">modules<\/a>. When the number of modules grows, it&#8217;ll become difficult to keep all of them in one location.<\/p>\n\n\n\n<p>And you may want to group modules into something meaningful.<\/p>\n\n\n\n<p>This is where packages come into play.<\/p>\n\n\n\n<p>Packages allow you to organize modules in the hierarchical structure.<\/p>\n\n\n\n<p>The way Python organizes packages and modules like the Operating System structures the folders and files.<\/p>\n\n\n\n<p>To create a package, you create a new folder and place the relevant modules in that folder.<\/p>\n\n\n\n<p>To instruct Python to treat a folder containing files as a package, you need to create a <code>__init__.py<\/code> file in the folder.<\/p>\n\n\n\n<p class=\"note\">Note that starting with Python 3.3, Python introduced the implicit namespace packages feature. This allows Python to treat a folder as a package without the <code>__init__.py<\/code>.<\/p>\n\n\n\n<p>For example, the following picture shows the <code>sales<\/code> package that contains three modules including <code>order<\/code>, <code>delivery<\/code>, and <code>billing<\/code>:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"190\" height=\"95\" src=\"https:\/\/www.pythontutorial.net\/wp-content\/uploads\/2020\/10\/Python-Packages.png\" alt=\"\" class=\"wp-image-532\"\/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id='importing-packages'>Importing packages <a href=\"#importing-packages\" class=\"anchor\" id=\"importing-packages\" title=\"Anchor for Importing packages\">#<\/a><\/h2>\n\n\n\n<p>To import a package, you use the <code>import<\/code> statement like this:<\/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\"><span class=\"hljs-keyword\">import<\/span> package.module<\/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>And to access an object from a module that belongs to a package, you use the dot notation:<\/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\">package.module.function<\/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>The following shows how to use functions in the <code>order<\/code>, <code>delivery<\/code>, and <code>billing<\/code> modules from the <code>sales<\/code> package:<\/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\"><span class=\"hljs-comment\"># main.py<\/span>\n<span class=\"hljs-keyword\">import<\/span> sales.order\n<span class=\"hljs-keyword\">import<\/span> sales.delivery\n<span class=\"hljs-keyword\">import<\/span> sales.billing\n\n\nsales.order.create_sales_order()\nsales.delivery.create_delivery()\nsales.billing.create_billing()<\/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>To make the code more concise, you can use the following statement to import a function from a module:<\/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\"><span class=\"hljs-keyword\">from<\/span> &lt;module&gt; <span class=\"hljs-keyword\">import<\/span> &lt;function&gt;<\/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>For example:<\/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\"><span class=\"hljs-comment\"># main.py<\/span>\n<span class=\"hljs-keyword\">from<\/span> sales.order <span class=\"hljs-keyword\">import<\/span> create_sales_order\n<span class=\"hljs-keyword\">from<\/span> sales.delivery <span class=\"hljs-keyword\">import<\/span> create_delivery\n<span class=\"hljs-keyword\">from<\/span> sales.billing <span class=\"hljs-keyword\">import<\/span> create_billing\n\n\ncreate_sales_order()\ncreate_delivery()\ncreate_billing()<\/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>It&#8217;s possible to rename the object when importing it:<\/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-comment\"># main.py<\/span>\n<span class=\"hljs-keyword\">from<\/span> sales.order <span class=\"hljs-keyword\">import<\/span> create_sales_order <span class=\"hljs-keyword\">as<\/span> create_order\n<span class=\"hljs-keyword\">from<\/span> sales.delivery <span class=\"hljs-keyword\">import<\/span> create_delivery <span class=\"hljs-keyword\">as<\/span> start_delivery\n<span class=\"hljs-keyword\">from<\/span> sales.billing <span class=\"hljs-keyword\">import<\/span> create_billing <span class=\"hljs-keyword\">as<\/span> issue_billing\n\n\ncreate_order()\nstart_delivery()\nissue_billing()<\/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>In this example, we rename&#8230;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The <code>create_sales_order<\/code> to <code>create_order<\/code>,<\/li>\n\n\n\n<li>The <code>create_delivery<\/code> to <code>start_delivery<\/code>,<\/li>\n\n\n\n<li>and the <code>create_billing<\/code> to <code>issue_billing<\/code>.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id='initializing-a-package'>Initializing a package <a href=\"#initializing-a-package\" class=\"anchor\" id=\"initializing-a-package\" title=\"Anchor for Initializing a package\">#<\/a><\/h2>\n\n\n\n<p>By convention, when you import a package, Python will execute the <code>__init__.py<\/code> in that package.<\/p>\n\n\n\n<p>Therefore, you can place the code in the <code>__init__.py<\/code> file to initialize package-level data.<\/p>\n\n\n\n<p>The following example defines a default tax rate in the <code>__init__.py<\/code> of the sales package:<\/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-comment\"># __init__.py<\/span>\n\n<span class=\"hljs-comment\"># default sales tax rate<\/span>\nTAX_RATE = <span class=\"hljs-number\">0.07<\/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>From the <code>main.py<\/code> file, you can access the <code>TAX_RATE<\/code> from the <code>sales<\/code> package like this:<\/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\"><span class=\"hljs-comment\"># main.py<\/span>\n<span class=\"hljs-keyword\">from<\/span> sales <span class=\"hljs-keyword\">import<\/span> TAX_RATE\n\nprint(TAX_RATE)<\/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<p>In addition to initializing package-level data, the <code>__init__.py<\/code> also allows you to automatically import modules from the package.<\/p>\n\n\n\n<p>For example, in the <code>__init__.py<\/code>, if you place the following statement:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-9\" data-shcb-language-name=\"Python\" data-shcb-language-slug=\"python\"><span><code class=\"hljs language-python\"><span class=\"hljs-comment\"># __init__.py<\/span>\n\n<span class=\"hljs-comment\"># import the order module automatically<\/span>\n<span class=\"hljs-keyword\">from<\/span> sales.order <span class=\"hljs-keyword\">import<\/span> create_sales_order\n\n<span class=\"hljs-comment\"># default sales tax rate<\/span>\nTAX_RATE = <span class=\"hljs-number\">0.07<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-9\"><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>And import the <code>sales<\/code> package from main.py file, the <code>create_sales_order<\/code> function will be automatically available as follows:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-10\" data-shcb-language-name=\"Python\" data-shcb-language-slug=\"python\"><span><code class=\"hljs language-python\"><span class=\"hljs-comment\"># main.py<\/span>\n<span class=\"hljs-keyword\">import<\/span> sales\n\nsales.order.create_sales_order()<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-10\"><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='from-package-import'>from &lt;package&gt; import * <a href=\"#from-package-import\" class=\"anchor\" id=\"from-package-import\" title=\"Anchor for from &lt;package&gt; import *\">#<\/a><\/h2>\n\n\n\n<p>When you use the statement to import all objects from a package:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-11\" data-shcb-language-name=\"Python\" data-shcb-language-slug=\"python\"><span><code class=\"hljs language-python\"><span class=\"hljs-keyword\">from<\/span> &lt;package&gt; <span class=\"hljs-keyword\">import<\/span> *\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-11\"><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>Python will look for the <code>__init__.py<\/code> file.<\/p>\n\n\n\n<p>If the <code>__init__.py<\/code> file exists, it&#8217;ll load all modules specified in a special list called <code>__all__<\/code> in the file.<\/p>\n\n\n\n<p>For example, you can place the order and delivery modules in the <code>__all__<\/code> list like this:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-12\" data-shcb-language-name=\"Python\" data-shcb-language-slug=\"python\"><span><code class=\"hljs language-python\"><span class=\"hljs-comment\"># __init__.py<\/span>\n\n__all__ = &#91;\n    <span class=\"hljs-string\">'order'<\/span>,\n    <span class=\"hljs-string\">'delivery'<\/span>\n]\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-12\"><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>And use the following import statement in the main.py:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-13\" data-shcb-language-name=\"Python\" data-shcb-language-slug=\"python\"><span><code class=\"hljs language-python\"><span class=\"hljs-comment\"># main.py<\/span>\n<span class=\"hljs-keyword\">from<\/span> sales <span class=\"hljs-keyword\">import<\/span> *\n\n\norder.create_sales_order()\ndelivery.create_delivery()\n\n<span class=\"hljs-comment\"># cannot access the billing module<\/span>\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-13\"><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>From the main.py, you can access functions defined in the <code>order<\/code> and <code>delivery<\/code> modules. But you cannot see the <code>billing<\/code> module because it isn&#8217;t in the <code>__all__<\/code> list.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id='subpackages'>Subpackages <a href=\"#subpackages\" class=\"anchor\" id=\"subpackages\" title=\"Anchor for Subpackages\">#<\/a><\/h2>\n\n\n\n<p>Packages can contain subpackages. The subpackages allow you to further organize modules.<\/p>\n\n\n\n<p>The following shows the <code>sales<\/code> package that contains three subpackages: <code>order<\/code>, <code>delivery<\/code>, and <code>billing<\/code>. Each subpackage has the corresponding module.<\/p>\n\n\n\n<p>For example, you can place all other modules related to the order processing in the <code>order<\/code> subpackage:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"185\" height=\"149\" src=\"https:\/\/www.pythontutorial.net\/wp-content\/uploads\/2020\/10\/Python-Subpackages.png\" alt=\"\" class=\"wp-image-533\"\/><\/figure>\n\n\n\n<p>Everything you&#8217;ve learned about packages is also relevant to subpackages.<\/p>\n\n\n\n<p>For example, to import a function from the <code>order<\/code> subpackage, you use the following <code>import<\/code> statement:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-14\" data-shcb-language-name=\"Python\" data-shcb-language-slug=\"python\"><span><code class=\"hljs language-python\"><span class=\"hljs-comment\"># main.py<\/span>\n<span class=\"hljs-keyword\">from<\/span> sales.order <span class=\"hljs-keyword\">import<\/span> create_sales_order\n\ncreate_sales_order()<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-14\"><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='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>A Python package contains one or more modules. Python uses the folders and files structure to manage packages and modules.<\/li>\n\n\n\n<li>Use the <code>__init__.py<\/code> file if you want to initialize the package-level data.<\/li>\n\n\n\n<li>Use <code>__all__<\/code> variable to specify the modules that will load automatically when importing the package.<\/li>\n\n\n\n<li>A package may contain subpackages.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id='quiz'>Quiz <a href=\"#quiz\" class=\"anchor\" id=\"quiz\" title=\"Anchor for Quiz\">#<\/a><\/h2>\n\n\n\n<iframe loading=\"lazy\"\n  name=\"quiz\"\n  src=\"\/quiz\/?quiz=package\"\n  height=\"700\"\n  width=\"600\"\n  class=\"iframe\"\n><\/iframe>\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=\"531\"\n\t\t\t\tdata-post-url=\"https:\/\/www.pythontutorial.net\/python-basics\/python-packages\/\"\n\t\t\t\tdata-post-title=\"Python Packages\"\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=\"531\"\n\t\t\t\tdata-post-url=\"https:\/\/www.pythontutorial.net\/python-basics\/python-packages\/\"\n\t\t\t\tdata-post-title=\"Python Packages\"\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 learn about the Python packages and how to use them to structure your application.<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":37,"menu_order":60,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-531","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.pythontutorial.net\/wp-json\/wp\/v2\/pages\/531","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=531"}],"version-history":[{"count":1,"href":"https:\/\/www.pythontutorial.net\/wp-json\/wp\/v2\/pages\/531\/revisions"}],"predecessor-version":[{"id":7218,"href":"https:\/\/www.pythontutorial.net\/wp-json\/wp\/v2\/pages\/531\/revisions\/7218"}],"up":[{"embeddable":true,"href":"https:\/\/www.pythontutorial.net\/wp-json\/wp\/v2\/pages\/37"}],"wp:attachment":[{"href":"https:\/\/www.pythontutorial.net\/wp-json\/wp\/v2\/media?parent=531"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}