{"id":16768,"date":"2021-09-07T11:26:33","date_gmt":"2021-09-07T05:56:33","guid":{"rendered":"http:\/\/www.pythonpool.com\/?p=16768"},"modified":"2021-09-07T11:26:36","modified_gmt":"2021-09-07T05:56:36","slug":"python-m-flag","status":"publish","type":"post","link":"https:\/\/www.pythonpool.com\/python-m-flag\/","title":{"rendered":"Python m Flag: Meaning and Applications"},"content":{"rendered":"\n<p>Every command-line executable has some flags to configure it while it runs. Some of the popular flags include &#8211;help to get idea documentation about executable, -v to check the executable version, and -m flag to run a Python module. Although there are many other flags available, only a few of them are actually useful.<\/p>\n\n\n\n<p><strong>Python m flag runs the module as mentioned in __main__ module. -m flag requires the user to add an &lt;module-name> as an argument right after it. After reading the argument, it checks the module in the sys.path and runs its content. Also, note that (.py) is not required while mentioning the module name in the command line.<\/strong><\/p>\n\n\n\n<p>You can use other supported characters from module names such as hyphen (-), under scroll (_), or dot (.) to call the specific modules. Some of the built-in modules are not available on this method because they are pre-compiled in C format and are not present in python modules.<\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_74 counter-hierarchy ez-toc-counter ez-toc-transparent ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #990303;color:#990303\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #990303;color:#990303\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 eztoc-toggle-hide-by-default' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.pythonpool.com\/python-m-flag\/#What_is_Python_m_flag\" >What is Python m flag?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.pythonpool.com\/python-m-flag\/#How_to_use_Python_m_flag\" >How to use Python m flag?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.pythonpool.com\/python-m-flag\/#Python_m_flag_Examples\" >Python m flag: Examples<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.pythonpool.com\/python-m-flag\/#http_server\" >http server<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.pythonpool.com\/python-m-flag\/#timeit\" >timeit<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.pythonpool.com\/python-m-flag\/#venv\" >venv<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/www.pythonpool.com\/python-m-flag\/#build\" >build<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/www.pythonpool.com\/python-m-flag\/#compileall\" >compileall<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/www.pythonpool.com\/python-m-flag\/#cprofile\" >cprofile<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/www.pythonpool.com\/python-m-flag\/#ensurepip\" >ensurepip<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/www.pythonpool.com\/python-m-flag\/#pip_install\" >pip install<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/www.pythonpool.com\/python-m-flag\/#jsontool\" >json.tool<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/www.pythonpool.com\/python-m-flag\/#unittest\" >unittest<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-14\" href=\"https:\/\/www.pythonpool.com\/python-m-flag\/#zipfile\" >zipfile<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-15\" href=\"https:\/\/www.pythonpool.com\/python-m-flag\/#References\" >References<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-16\" href=\"https:\/\/www.pythonpool.com\/python-m-flag\/#Final_Words\" >Final Words<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-17\" href=\"https:\/\/www.pythonpool.com\/python-m-flag\/#Trending_Python_Articles\" >Trending Python Articles<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\" id=\"h-what-is-python-m-flag\"><span class=\"ez-toc-section\" id=\"What_is_Python_m_flag\"><\/span>What is Python m flag?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>m Flag corresponds to module-name in simple terms. Using this command, you can <strong>run any module from your terminal<\/strong> directly without creating a code. This flexibility allows us to <strong>run scripts<\/strong> and helpful commands without ever touching or typing the code. In this post, we&#8217;ll have a look at all of these commands.<\/p>\n\n\n\n<p>Moreover, the argument after -m is a module-name, and it&#8217;s searched in the sys.path for its location. You can include your current directory in the sys.path by using one additional -c flag.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-how-to-use-python-m-flag\"><span class=\"ez-toc-section\" id=\"How_to_use_Python_m_flag\"><\/span>How to use Python m flag?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Using the -m flag is way easier than actually running python. With a simple structure, you can execute your commands and print them to stdout. Following is the structure to use the m flag &#8211;<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\npython -m &lt;module-name&gt;\n<\/pre><\/div>\n\n\n<p>Open your terminal and enter the above command in it. Make sure you replace &lt;module-name> with available module names such as <strong>http.server, timeit, venv, <\/strong>and others. Also, if you have multiple pythons installed, you can run the m flag in the following way &#8211;<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\npython -m flag &lt;module-name&gt;\n\npython3 -m flag &lt;module-name&gt;\n\npython3.6 -m flag &lt;module-name&gt;\n<\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"h-python-m-flag-examples\"><span class=\"ez-toc-section\" id=\"Python_m_flag_Examples\"><\/span>Python m flag: Examples<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Since many modules are available in Python, you can get thousands of ways to run the m flag. We&#8217;re going to have a look at a few of them which are used the most.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"http_server\"><\/span>http server<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p><strong>Usage<\/strong>:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n# Syntax: python -m http.server &lt;PORT&gt;\n\npython -m http.server 8000\n<\/pre><\/div>\n\n\n<p><strong>Result<\/strong>:<\/p>\n\n\n\n<p>http.server is a module that creates a directory hosting from your computer. This is a useful way of <strong>sharing files among your local network<\/strong>. By default, port <strong>8000 <\/strong>is used to host the server, but you can customize it by sending additional port arguments.<\/p>\n\n\n\n<p>This method creates a directory hosting of your current directory only. Your parent directories will not be accessible once you do that. So make sure you are in the desired directory to run this.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img decoding=\"async\" width=\"549\" height=\"326\" src=\"http:\/\/www.pythonpool.com\/wp-content\/uploads\/2021\/09\/Python-m-flag-http.server.webp\" alt=\"python m flag http.server\" class=\"wp-image-16797\" srcset=\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2021\/09\/Python-m-flag-http.server.webp 549w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2021\/09\/Python-m-flag-http.server-300x178.webp 300w\" sizes=\"(max-width: 549px) 100vw, 549px\" \/><\/figure><\/div>\n\n\n\n<p>Other computers over the network can access this server by going to their browser and entering {ServerIP:PORT} in place of URL.<\/p>\n\n\n<div class=\"monsterinsights-inline-popular-posts monsterinsights-inline-popular-posts-mike monsterinsights-popular-posts-styled\" ><div class=\"monsterinsights-inline-popular-posts-image\"><a href=\"https:\/\/www.pythonpool.com\/fixed-typeerror-cant-compare-datetime-datetime-to-datetime-date\/\"><img decoding=\"async\" src=\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/typeerror-cant-compare-datetime.datetime-to-datetime.date_-300x157.webp\" srcset=\" https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/typeerror-cant-compare-datetime.datetime-to-datetime.date_-300x157.webp 300w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/typeerror-cant-compare-datetime.datetime-to-datetime.date_-1024x536.webp 1024w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/typeerror-cant-compare-datetime.datetime-to-datetime.date_-768x402.webp 768w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/typeerror-cant-compare-datetime.datetime-to-datetime.date_.webp 1200w \" alt=\"[Fixed] typeerror can&#8217;t compare datetime.datetime to datetime.date\" \/><\/a><\/div><div class=\"monsterinsights-inline-popular-posts-text\"><span class=\"monsterinsights-inline-popular-posts-label\" >Trending<\/span><div class=\"monsterinsights-inline-popular-posts-post\"><a class=\"monsterinsights-inline-popular-posts-title\"  href=\"https:\/\/www.pythonpool.com\/fixed-typeerror-cant-compare-datetime-datetime-to-datetime-date\/\">[Fixed] typeerror can&#8217;t compare datetime.datetime to datetime.date<\/a><\/div><\/div><\/div><p><\/p>\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"timeit\"><\/span>timeit<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p><strong>Usage<\/strong>:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n# Syntax: python -m timeit &lt;loop-code&gt;\n\npython -m timeit '&quot;-&quot;.join(map(str,range(100)))'\n<\/pre><\/div>\n\n\n<p><strong>Result<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>50000000 loops, best of 5: 8.56 nsec per loop<\/code><\/pre>\n\n\n\n<p><a href=\"http:\/\/www.pythonpool.com\/python-timeit\/\" target=\"_blank\" rel=\"noopener\">Timeit is a great way of <strong>measuring time<\/strong> for small python<\/a> codes. You can <a href=\"http:\/\/www.pythonpool.com\/python-timer\/\">effectively measure execution time<\/a> by using this simple m flag. The above code demonstrates a simple command-line way of measuring time for 50M loops.<\/p>\n\n\n\n<p>The loop code can be simple for loop or a combination of map and range() functions.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"venv\"><\/span>venv<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Virtual Environments are a great way of keeping your <strong>running environment clean from the global environment<\/strong>. This way you can install custom modules and create environmental variables without worrying about conflicts with other projects.<\/p>\n\n\n\n<p><strong>Usage<\/strong>:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n# Syntax: python -m venv &lt;path&gt;\n\npython -m venv env\n<\/pre><\/div>\n\n\n<p><strong>Result<\/strong>:<\/p>\n\n\n\n<p>The python m flag command calls the venv module and set up a virtual environment at the mentioned path. In the above example, we&#8217;ve used &#8216;env&#8217; as a path for creating a  virtual environment.<\/p>\n\n\n\n<p class=\"has-white-color has-vivid-red-background-color has-text-color has-background\"><strong>Please note that you need to activate the virtual environment before using it.<\/strong><\/p>\n\n\n<div class=\"monsterinsights-inline-popular-posts monsterinsights-inline-popular-posts-beta monsterinsights-popular-posts-styled\" ><div class=\"monsterinsights-inline-popular-posts-image\"><a href=\"https:\/\/www.pythonpool.com\/fixed-nameerror-name-unicode-is-not-defined\/\"><img decoding=\"async\" src=\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/Fixed-nameerror-name-Unicode-is-not-defined-300x157.webp\" srcset=\" https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/Fixed-nameerror-name-Unicode-is-not-defined-300x157.webp 300w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/Fixed-nameerror-name-Unicode-is-not-defined-1024x536.webp 1024w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/Fixed-nameerror-name-Unicode-is-not-defined-768x402.webp 768w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/Fixed-nameerror-name-Unicode-is-not-defined.webp 1200w \" alt=\"[Fixed] nameerror: name Unicode is not defined\" \/><\/a><\/div><div class=\"monsterinsights-inline-popular-posts-text\"><span class=\"monsterinsights-inline-popular-posts-label\" >Trending<\/span><div class=\"monsterinsights-inline-popular-posts-post\"><a class=\"monsterinsights-inline-popular-posts-title\"  href=\"https:\/\/www.pythonpool.com\/fixed-nameerror-name-unicode-is-not-defined\/\">[Fixed] nameerror: name Unicode is not defined<\/a><\/div><\/div><\/div><p><\/p>\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"build\"><\/span>build<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p><strong>Usage<\/strong>:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n# Syntax: python -m build\n\npython -m build\n<\/pre><\/div>\n\n\n<p><strong>Result<\/strong>:<\/p>\n\n\n\n<p>Building a module\/source file is necessary for certain conditions. Normally, there is no easy way of doing it without the help of any module. <\/p>\n\n\n\n<p>python -m build a way to generate source distribution and wheel files for your package. <a href=\"http:\/\/www.pythonpool.com\/stringbuilder-python\/\" target=\"_blank\" rel=\"noopener\"><\/a>To use this flag, you need to install the <strong>PEP517 package builder<\/strong> module first by running <\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">pip install build<\/pre>\n\n\n\n<p>Then, use the -m build command to generate files in dist\/ directory. <\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"compileall\"><\/span>compileall<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Pyc format is handy to run the files fast. But the generation of pyc files is an automated process by default. But you can control it by compiling the pyc files on your own by using compileall python m flag.<\/p>\n\n\n\n<p><strong>Usage<\/strong>:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n# Syntax: python -m compileall &lt;file1&gt; &lt;file2&gt; ...\n\npython -m compileall main.py\n<\/pre><\/div>\n\n\n<p><strong>Result<\/strong>:<\/p>\n\n\n\n<p>In the above example, we&#8217;ve compiled the<strong> main.py file to pyc <\/strong>format. After running this command, there should be a file named <code>main.cpython-{Python-version}.pyc<\/code> in __pycache__ folder.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"cprofile\"><\/span>cprofile<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p><strong>Usage<\/strong>:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n# Syntax: python -m cProfile &lt;file&gt;\n\npython -m cProfile main.py\n<\/pre><\/div>\n\n\n<p><strong>Result<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>         24 function calls in 0.027 seconds\n\n   Ordered by: standard name\n\n   ncalls  tottime  percall  cumtime  percall filename:lineno(function)\n        1    0.000    0.000    0.027    0.027 rea.py:1(&lt;module&gt;)\n        1    0.000    0.000    0.027    0.027 {built-in method builtins.exec}\n       21    0.027    0.001    0.027    0.001 {built-in method builtins.print}\n        1    0.000    0.000    0.000    0.000 {method 'disable' of '_lsprof.Profiler' objects}<\/code><\/pre>\n\n\n\n<p>cProfile is a profiler used to calculate the <strong>total running time and total function calls<\/strong> within a code. As a result, this demonstrates how many times each function is called and which causes the most running time. This is a great way of debugging your spaghetti code!<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"ensurepip\"><\/span>ensurepip<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p><strong>Usage<\/strong>:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n# Syntax: python -m ensurepip --upgrade\n\npython -m ensurepip --upgrade\n<\/pre><\/div>\n\n\n<p><strong>Result<\/strong>:<\/p>\n\n\n\n<p>pip is a package manager for python which can be used to install other modules. With coming updates to python, sometimes the pip needs to be updated too. This is where ensurepip comes into action.<\/p>\n\n\n\n<p>This flag guarantees the correct pip for every python version and updates it accordingly. Moreover, if there are multiple pythons on your computer, you can update it by running single commands.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"pip_install\"><\/span>pip install<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p><strong>Usage<\/strong>:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n# Syntax: python -m pip install &lt;package-name&gt;\n\npython -m pip install numpy\n<\/pre><\/div>\n\n\n<p><strong>Result<\/strong>:<\/p>\n\n\n\n<p>Sometimes, there are <a href=\"http:\/\/www.pythonpool.com\/pip-vs-pip3\/\">different versions of python and pip<\/a> installed on your computer. This leads to the pain of installing new modules. There are many different pip versions, it&#8217;ll be hard to install modules into specific python environments.<\/p>\n\n\n\n<p>This is where the m flag comes into play. Then, -m pip install ensures that the module is installed to <strong>executable python environment only<\/strong>. This way, you can take care of incorrect environment installs.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"jsontool\"><\/span>json.tool<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>JSON is a widely used data structure that can store hierarchical data. Most of the APIs use JSON response as a method to provide their services. But handling a minified JSON can be a head-scratcher for any developer.<\/p>\n\n\n\n<p>Python m flag json.tool prettifies the JSON and views the data in a proper format. <\/p>\n\n\n\n<p><strong>Usage<\/strong>:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n# Syntax: python -m json.tool &lt;json-file&gt;\n\npython -m json.tool file.json\n<\/pre><\/div>\n\n\n<p><strong>Result<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>file.json: {\"foo\":\"lorem\",\"bar\":\"ipsum\"}\n\nOutput: {\n    \"foo\": \"lorem\",\n    \"bar\": \"ipsum\"\n}<\/code><\/pre>\n\n\n\n<p>The above JSON file is <strong>prettified <\/strong>into readable format. You can use the &#8220;&gt;&#8221; method in the command line to save this prettified JSON to file.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"unittest\"><\/span>unittest<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p><a href=\"http:\/\/www.pythonpool.com\/python-unittest-vs-pytest\/\">Unittest<\/a> is a famous module in python used as the testing framework. In programming, testing is as much important as writing the code. Fortunately, there are easy ways to run the test in unittest once you create the test module.<\/p>\n\n\n\n<p><strong>Usage<\/strong>:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n# Syntax: python -m unittest &lt;test-module&gt;\n\npython -m unittest test.py\n<\/pre><\/div>\n\n\n<p><strong>Result<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">test_isupper (__main__.TestStringMethod) ... ok\ntest_split (__main__.TestStringMethod) ... ok\ntest_upper (__main__.TestStringMethod) ... ok\n\n----------------------------------------------------------------------\nRan 3 tests <strong>in<\/strong> 0.001s\n\nOK<\/pre>\n\n\n\n<p>The above m flag executes the unittest module and runs the test module to test different cases. In the above example, we&#8217;ve used 3 basic string tests.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"zipfile\"><\/span>zipfile<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Zipfile is a useful module to handle zip files by using Python. You can compress the files and <a href=\"http:\/\/www.pythonpool.com\/python-unzip\/\">extract (unzip) them<\/a>. This module has an executable m flag that can be used to compress any folder.<\/p>\n\n\n\n<p><strong>Usage<\/strong>:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n# Syntax: python -m zipfile -c &lt;zip-file-name&gt; &lt;directory&gt;\n\npython -m -c folder.zip folder\/\n<\/pre><\/div>\n\n\n<p><strong>Result<\/strong>:<\/p>\n\n\n\n<p>Python m flag zipfile is used to compress any directory into zipfile. This command uses the default compress_type and compresslevel configuration in creating zip files.<\/p>\n\n\n<div class=\"monsterinsights-inline-popular-posts monsterinsights-inline-popular-posts-golf monsterinsights-popular-posts-styled\" ><div class=\"monsterinsights-inline-popular-posts-text\"><span class=\"monsterinsights-inline-popular-posts-label\" >Popular now<\/span><span class=\"monsterinsights-inline-popular-posts-border\" ><\/span><span class=\"monsterinsights-inline-popular-posts-border-2\" ><\/span><div class=\"monsterinsights-inline-popular-posts-post\"><a class=\"monsterinsights-inline-popular-posts-title\"  href=\"https:\/\/www.pythonpool.com\/solved-runtimeerror-cuda-error-invalid-device-ordinal\/\">[Solved] runtimeerror: cuda error: invalid device ordinal<\/a><\/div><\/div><\/div><p><\/p>\n\n\n<h2 class=\"wp-block-heading\" id=\"h-references\"><span class=\"ez-toc-section\" id=\"References\"><\/span>References<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li><a href=\"https:\/\/docs.python.org\/3\/library\/timeit.html\" target=\"_blank\" rel=\"noreferrer noopener\">Timeit<\/a>: Measure execution time of small code snippets<\/li><li><a href=\"https:\/\/docs.python.org\/3\/library\/http.server.html\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">http.server<\/a>: HTTP Server Module<\/li><li><a href=\"https:\/\/docs.python.org\/3\/library\/json.html\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">JSON Module<\/a>: JSON encoder and decoder<\/li><li><a href=\"https:\/\/docs.python.org\/3\/library\/venv.html\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">venv<\/a>: Creation of virtual environments<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-final-words\"><span class=\"ez-toc-section\" id=\"Final_Words\"><\/span>Final Words<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Python is growing at a huge pace due to its simplicity and ease to use. -m flag is definitely an astonishing way to executing modules without even <a href=\"http:\/\/www.pythonpool.com\/python-touch-file\/\" target=\"_blank\" rel=\"noopener\">touching the python files<\/a>. This post explained different ways through which you can run these flags.<\/p>\n\n\n\n<p><em>If have any doubt regarding any of the command, let us know in the comments!<\/em><\/p>\n\n\n<div class=\"monsterinsights-widget-popular-posts monsterinsights-widget-popular-posts-charlie monsterinsights-popular-posts-styled monsterinsights-widget-popular-posts-columns-1\"><h2 class=\"monsterinsights-widget-popular-posts-widget-title\"><span class=\"ez-toc-section\" id=\"Trending_Python_Articles\"><\/span>Trending Python Articles<span class=\"ez-toc-section-end\"><\/span><\/h2><ul class=\"monsterinsights-widget-popular-posts-list\"><li style=\"background-color:#FBB82B;border-color:#CD3034;\"><a href=\"https:\/\/www.pythonpool.com\/fixed-typeerror-cant-compare-datetime-datetime-to-datetime-date\/\"><div class=\"monsterinsights-widget-popular-posts-text\"><span class=\"monsterinsights-widget-popular-posts-title\" style=\"color:#000000;font-size:18px;\">[Fixed] typeerror can&#8217;t compare datetime.datetime to datetime.date<\/span><div class=\"monsterinsights-widget-popular-posts-meta\" ><\/div><\/div><\/a><\/li><li style=\"background-color:#FBB82B;border-color:#CD3034;\"><a href=\"https:\/\/www.pythonpool.com\/fixed-nameerror-name-unicode-is-not-defined\/\"><div class=\"monsterinsights-widget-popular-posts-text\"><span class=\"monsterinsights-widget-popular-posts-title\" style=\"color:#000000;font-size:18px;\">[Fixed] nameerror: name Unicode is not defined<\/span><div class=\"monsterinsights-widget-popular-posts-meta\" ><\/div><\/div><\/a><\/li><li style=\"background-color:#FBB82B;border-color:#CD3034;\"><a href=\"https:\/\/www.pythonpool.com\/solved-runtimeerror-cuda-error-invalid-device-ordinal\/\"><div class=\"monsterinsights-widget-popular-posts-text\"><span class=\"monsterinsights-widget-popular-posts-title\" style=\"color:#000000;font-size:18px;\">[Solved] runtimeerror: cuda error: invalid device ordinal<\/span><div class=\"monsterinsights-widget-popular-posts-meta\" ><\/div><\/div><\/a><\/li><li style=\"background-color:#FBB82B;border-color:#CD3034;\"><a href=\"https:\/\/www.pythonpool.com\/fixed-typeerror-type-numpy-ndarray-doesnt-define-__round__-method\/\"><div class=\"monsterinsights-widget-popular-posts-text\"><span class=\"monsterinsights-widget-popular-posts-title\" style=\"color:#000000;font-size:18px;\">[Fixed] typeerror: type numpy.ndarray doesn&#8217;t define __round__ method<\/span><div class=\"monsterinsights-widget-popular-posts-meta\" ><\/div><\/div><\/a><\/li><\/ul><\/div><p><\/p>","protected":false},"excerpt":{"rendered":"<p>Every command-line executable has some flags to configure it while it runs. Some of the popular flags include &#8211;help to get idea documentation about executable, &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"Python m Flag: Meaning and Applications\" class=\"read-more button\" href=\"https:\/\/www.pythonpool.com\/python-m-flag\/#more-16768\" aria-label=\"More on Python m Flag: Meaning and Applications\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":16817,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[15],"tags":[4444,4446,4445,4443],"class_list":["post-16768","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","tag-python-m-flag","tag-python-m-flag-debugging-modules","tag-python-m-flag-pip","tag-python-use-of-m-flag","infinite-scroll-item"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v20.1 (Yoast SEO v25.0) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Python m Flag: Meaning and Applications - Python Pool<\/title>\n<meta name=\"description\" content=\"Python m flag runs the module as mentioned in __main__ module. -m flag requires the user to add an as an argument right after it. After...\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.pythonpool.com\/python-m-flag\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Python m Flag: Meaning and Applications\" \/>\n<meta property=\"og:description\" content=\"Every command-line executable has some flags to configure it while it runs. Some of the popular flags include --help to get idea documentation about\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.pythonpool.com\/python-m-flag\/\" \/>\n<meta property=\"og:site_name\" content=\"Python Pool\" \/>\n<meta property=\"article:published_time\" content=\"2021-09-07T05:56:33+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-09-07T05:56:36+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2021\/09\/Python-m-Flag.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Python Pool\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@pythonpool\" \/>\n<meta name=\"twitter:site\" content=\"@pythonpool\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Python Pool\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.pythonpool.com\/python-m-flag\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.pythonpool.com\/python-m-flag\/\"},\"author\":{\"name\":\"Python Pool\",\"@id\":\"https:\/\/www.pythonpool.com\/#\/schema\/person\/f87448ee54c0ffd2889fbf2408c18998\"},\"headline\":\"Python m Flag: Meaning and Applications\",\"datePublished\":\"2021-09-07T05:56:33+00:00\",\"dateModified\":\"2021-09-07T05:56:36+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.pythonpool.com\/python-m-flag\/\"},\"wordCount\":1266,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.pythonpool.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.pythonpool.com\/python-m-flag\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2021\/09\/Python-m-Flag.png\",\"keywords\":[\"python -m flag\",\"python m flag debugging modules\",\"python m flag pip\",\"python use of -m flag\"],\"articleSection\":[\"Tutorials\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.pythonpool.com\/python-m-flag\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.pythonpool.com\/python-m-flag\/\",\"url\":\"https:\/\/www.pythonpool.com\/python-m-flag\/\",\"name\":\"Python m Flag: Meaning and Applications - Python Pool\",\"isPartOf\":{\"@id\":\"https:\/\/www.pythonpool.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.pythonpool.com\/python-m-flag\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.pythonpool.com\/python-m-flag\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2021\/09\/Python-m-Flag.png\",\"datePublished\":\"2021-09-07T05:56:33+00:00\",\"dateModified\":\"2021-09-07T05:56:36+00:00\",\"description\":\"Python m flag runs the module as mentioned in __main__ module. -m flag requires the user to add an as an argument right after it. After...\",\"breadcrumb\":{\"@id\":\"https:\/\/www.pythonpool.com\/python-m-flag\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.pythonpool.com\/python-m-flag\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.pythonpool.com\/python-m-flag\/#primaryimage\",\"url\":\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2021\/09\/Python-m-Flag.png\",\"contentUrl\":\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2021\/09\/Python-m-Flag.png\",\"width\":1200,\"height\":628,\"caption\":\"Python m Flag\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.pythonpool.com\/python-m-flag\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.pythonpool.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Python m Flag: Meaning and Applications\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.pythonpool.com\/#website\",\"url\":\"https:\/\/www.pythonpool.com\/\",\"name\":\"Python Pool\",\"description\":\"Your One-Stop Python Learning Destination\",\"publisher\":{\"@id\":\"https:\/\/www.pythonpool.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.pythonpool.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.pythonpool.com\/#organization\",\"name\":\"Python Pool\",\"url\":\"https:\/\/www.pythonpool.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.pythonpool.com\/#\/schema\/logo\/image\/\",\"url\":\"http:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/08\/aa.png\",\"contentUrl\":\"http:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/08\/aa.png\",\"width\":452,\"height\":185,\"caption\":\"Python Pool\"},\"image\":{\"@id\":\"https:\/\/www.pythonpool.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/x.com\/pythonpool\",\"https:\/\/www.youtube.com\/c\/pythonpool\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.pythonpool.com\/#\/schema\/person\/f87448ee54c0ffd2889fbf2408c18998\",\"name\":\"Python Pool\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.pythonpool.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/fdd3cb9ad7f560324dfd481989550aa8ffce84388fd253c42beca35c999d3108?s=96&d=wavatar&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/fdd3cb9ad7f560324dfd481989550aa8ffce84388fd253c42beca35c999d3108?s=96&d=wavatar&r=g\",\"caption\":\"Python Pool\"}}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Python m Flag: Meaning and Applications - Python Pool","description":"Python m flag runs the module as mentioned in __main__ module. -m flag requires the user to add an as an argument right after it. After...","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.pythonpool.com\/python-m-flag\/","og_locale":"en_US","og_type":"article","og_title":"Python m Flag: Meaning and Applications","og_description":"Every command-line executable has some flags to configure it while it runs. Some of the popular flags include --help to get idea documentation about","og_url":"https:\/\/www.pythonpool.com\/python-m-flag\/","og_site_name":"Python Pool","article_published_time":"2021-09-07T05:56:33+00:00","article_modified_time":"2021-09-07T05:56:36+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2021\/09\/Python-m-Flag.png","type":"image\/png"}],"author":"Python Pool","twitter_card":"summary_large_image","twitter_creator":"@pythonpool","twitter_site":"@pythonpool","twitter_misc":{"Written by":"Python Pool","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.pythonpool.com\/python-m-flag\/#article","isPartOf":{"@id":"https:\/\/www.pythonpool.com\/python-m-flag\/"},"author":{"name":"Python Pool","@id":"https:\/\/www.pythonpool.com\/#\/schema\/person\/f87448ee54c0ffd2889fbf2408c18998"},"headline":"Python m Flag: Meaning and Applications","datePublished":"2021-09-07T05:56:33+00:00","dateModified":"2021-09-07T05:56:36+00:00","mainEntityOfPage":{"@id":"https:\/\/www.pythonpool.com\/python-m-flag\/"},"wordCount":1266,"commentCount":0,"publisher":{"@id":"https:\/\/www.pythonpool.com\/#organization"},"image":{"@id":"https:\/\/www.pythonpool.com\/python-m-flag\/#primaryimage"},"thumbnailUrl":"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2021\/09\/Python-m-Flag.png","keywords":["python -m flag","python m flag debugging modules","python m flag pip","python use of -m flag"],"articleSection":["Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.pythonpool.com\/python-m-flag\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.pythonpool.com\/python-m-flag\/","url":"https:\/\/www.pythonpool.com\/python-m-flag\/","name":"Python m Flag: Meaning and Applications - Python Pool","isPartOf":{"@id":"https:\/\/www.pythonpool.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.pythonpool.com\/python-m-flag\/#primaryimage"},"image":{"@id":"https:\/\/www.pythonpool.com\/python-m-flag\/#primaryimage"},"thumbnailUrl":"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2021\/09\/Python-m-Flag.png","datePublished":"2021-09-07T05:56:33+00:00","dateModified":"2021-09-07T05:56:36+00:00","description":"Python m flag runs the module as mentioned in __main__ module. -m flag requires the user to add an as an argument right after it. After...","breadcrumb":{"@id":"https:\/\/www.pythonpool.com\/python-m-flag\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.pythonpool.com\/python-m-flag\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.pythonpool.com\/python-m-flag\/#primaryimage","url":"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2021\/09\/Python-m-Flag.png","contentUrl":"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2021\/09\/Python-m-Flag.png","width":1200,"height":628,"caption":"Python m Flag"},{"@type":"BreadcrumbList","@id":"https:\/\/www.pythonpool.com\/python-m-flag\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.pythonpool.com\/"},{"@type":"ListItem","position":2,"name":"Python m Flag: Meaning and Applications"}]},{"@type":"WebSite","@id":"https:\/\/www.pythonpool.com\/#website","url":"https:\/\/www.pythonpool.com\/","name":"Python Pool","description":"Your One-Stop Python Learning Destination","publisher":{"@id":"https:\/\/www.pythonpool.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.pythonpool.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.pythonpool.com\/#organization","name":"Python Pool","url":"https:\/\/www.pythonpool.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.pythonpool.com\/#\/schema\/logo\/image\/","url":"http:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/08\/aa.png","contentUrl":"http:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/08\/aa.png","width":452,"height":185,"caption":"Python Pool"},"image":{"@id":"https:\/\/www.pythonpool.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/pythonpool","https:\/\/www.youtube.com\/c\/pythonpool"]},{"@type":"Person","@id":"https:\/\/www.pythonpool.com\/#\/schema\/person\/f87448ee54c0ffd2889fbf2408c18998","name":"Python Pool","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.pythonpool.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/fdd3cb9ad7f560324dfd481989550aa8ffce84388fd253c42beca35c999d3108?s=96&d=wavatar&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/fdd3cb9ad7f560324dfd481989550aa8ffce84388fd253c42beca35c999d3108?s=96&d=wavatar&r=g","caption":"Python Pool"}}]}},"_links":{"self":[{"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/posts\/16768","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/comments?post=16768"}],"version-history":[{"count":14,"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/posts\/16768\/revisions"}],"predecessor-version":[{"id":24475,"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/posts\/16768\/revisions\/24475"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/media\/16817"}],"wp:attachment":[{"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/media?parent=16768"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/categories?post=16768"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/tags?post=16768"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}