{"id":4315,"date":"2022-03-10T16:44:55","date_gmt":"2022-03-10T16:44:55","guid":{"rendered":"https:\/\/ibex.tech\/python\/?p=4315"},"modified":"2022-03-10T17:05:00","modified_gmt":"2022-03-10T17:05:00","slug":"modules-general","status":"publish","type":"post","link":"https:\/\/ibex.tech\/python\/modules\/modules-general","title":{"rendered":".Modules general"},"content":{"rendered":"\n<p>&#8220;Modules &#8220;, &#8220;libraries&#8221; and &#8220;packages&#8221; are common terms for modules in python (a package is really a directory that holds a collection of modules).<\/p>\n\n\n\n<p>A module is a collection of Python declarations intended broadly to be used as a tool. <\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Use a module in a file<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>#Import a specific object from a module\nfrom module_name import object_name\n\n#Import an entire module\nimport module_name\n\n#Import an entire module and use your own namespace name (can be handy if you hav a namespace clash)\nimport module_name as my_choice_of_namespace_name<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>&#8220;Modules &#8220;, &#8220;libraries&#8221; and &#8220;packages&#8221; are common terms for modules in python (a package is really a directory that holds a collection of modules). A module is a collection of Python declarations intended broadly to be used as a tool. Use a module in a file<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[338],"tags":[],"class_list":["post-4315","post","type-post","status-publish","format-standard","hentry","category-modules"],"_links":{"self":[{"href":"https:\/\/ibex.tech\/python\/wp-json\/wp\/v2\/posts\/4315","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ibex.tech\/python\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ibex.tech\/python\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ibex.tech\/python\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/ibex.tech\/python\/wp-json\/wp\/v2\/comments?post=4315"}],"version-history":[{"count":2,"href":"https:\/\/ibex.tech\/python\/wp-json\/wp\/v2\/posts\/4315\/revisions"}],"predecessor-version":[{"id":4327,"href":"https:\/\/ibex.tech\/python\/wp-json\/wp\/v2\/posts\/4315\/revisions\/4327"}],"wp:attachment":[{"href":"https:\/\/ibex.tech\/python\/wp-json\/wp\/v2\/media?parent=4315"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibex.tech\/python\/wp-json\/wp\/v2\/categories?post=4315"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibex.tech\/python\/wp-json\/wp\/v2\/tags?post=4315"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}