{ "info": { "author": "Allen Barker", "author_email": "Allen.L.Barker@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: Microsoft :: Windows", "Operating System :: POSIX", "Operating System :: Unix", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Utilities" ], "description": "\n.. default-role:: code\n\nset-package-attribute\n=====================\n\nRun modules inside packages as scripts. Automatically sets the `__package__`\nattribute of any script which imports it and calls the initialization function\n`set_package_attribute.init()`. This is usually done so that the usual\nintra-package imports work for scripts inside packages.\n\nFor full documentation, see https://abarker.github.io/set-package-attribute.\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nAlso available on PyPI for installation with pip.\n\nBrief usage summary\n===================\n\nTo use the package just import it before any of the non-system files, inside any\nmodule that you might want to run as a script, and call the `init` function.\nThese statements should be inside a guard conditional, so that they only run\nwhen the module is executed as a script::\n\n if __name__ == \"__main__\":\n import set_package_attribute\n set_package_attribute.init()\n\nNothing else is required. The `init` function must be called **before** any\nwithin-package explicit relative imports, and before importing any modules from\nwithin the same package which themselves use such imports. \n\nIf you are happy with the default `init` arguments then there is a shortcut\nimport which automatically calls `init` for you::\n\n if __name__ == \"__main__\":\n import set_package_attribute_magic\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/abarker/set-package-attribute", "keywords": "module", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "set-package-attribute", "package_url": "https://pypi.org/project/set-package-attribute/", "platform": "", "project_url": "https://pypi.org/project/set-package-attribute/", "project_urls": { "Homepage": "https://github.com/abarker/set-package-attribute" }, "release_url": "https://pypi.org/project/set-package-attribute/0.2.3/", "requires_dist": null, "requires_python": "", "summary": "Automatically set the __package__ attribute of a script.", "version": "0.2.3" }, "last_serial": 5323433, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "7a1763931179644737a20aaeaa3cfd5d", "sha256": "07ab9cd09f5fe4809838a563e9c27fc9946fe3286decd7d1be37ffd56c693580" }, "downloads": -1, "filename": "set-package-attribute-0.1.0.tar.gz", "has_sig": false, "md5_digest": "7a1763931179644737a20aaeaa3cfd5d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5934, "upload_time": "2016-07-10T04:47:11", "url": "https://files.pythonhosted.org/packages/93/00/900a027d14d67fce76ee03b4a6aa62257905130d7f6f93d11f1579f07595/set-package-attribute-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "03344a176194af71156eea5a815e8022", "sha256": "598730a530cd81e88c8d739b7800cda9c4527b529371d9fb5f772d76232f4b50" }, "downloads": -1, "filename": "set-package-attribute-0.1.1.tar.gz", "has_sig": false, "md5_digest": "03344a176194af71156eea5a815e8022", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6033, "upload_time": "2016-07-11T20:10:49", "url": "https://files.pythonhosted.org/packages/ec/77/caa03c7bb5c1000f39d6e2c937541f319b604d7f27a2615351de2d921c75/set-package-attribute-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "15a8f78f519a8223d6deb45142fe1497", "sha256": "70b5059c3f3894f5db3408fdeaa2856d4599f882ef3f31c404fb05d5c5a3bb54" }, "downloads": -1, "filename": "set-package-attribute-0.1.2.tar.gz", "has_sig": false, "md5_digest": "15a8f78f519a8223d6deb45142fe1497", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6623, "upload_time": "2019-05-06T00:32:09", "url": "https://files.pythonhosted.org/packages/68/2c/b87b6d2d15ac3b83b249790448326cbdd68ce977806d9f9a6abe1e74c53d/set-package-attribute-0.1.2.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "0e554b29f0d5ebf51ee8c7c2400d2bc6", "sha256": "d9fc41d085fc8eed93946fc5ef78ad1ae79bfbdb0287379ba4504ede4e5dd568" }, "downloads": -1, "filename": "set-package-attribute-0.2.0.tar.gz", "has_sig": false, "md5_digest": "0e554b29f0d5ebf51ee8c7c2400d2bc6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6743, "upload_time": "2019-05-06T02:43:39", "url": "https://files.pythonhosted.org/packages/22/37/f14da1eed84bbd29a1554afdfa1112886012d852587165e4bb9bd7d4c7f9/set-package-attribute-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "00dd6e8dfcf06ce75077637246469973", "sha256": "45acc61dd43f9f1eceeb8c9311d5ca92e00cd608e7688605f4d2ed4c09d602d4" }, "downloads": -1, "filename": "set-package-attribute-0.2.1.tar.gz", "has_sig": false, "md5_digest": "00dd6e8dfcf06ce75077637246469973", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6754, "upload_time": "2019-05-27T16:24:48", "url": "https://files.pythonhosted.org/packages/ad/d2/62b028ac895b8df63d94f84de4aa5114f6e884543df40bc642fbdd96e32e/set-package-attribute-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "f27bdce370aa7419251a18f664e4469a", "sha256": "75a2faadf2512517d429eca5ed74fbfe252567c1a2252c4d5932e1f0b5745e9d" }, "downloads": -1, "filename": "set-package-attribute-0.2.2.tar.gz", "has_sig": false, "md5_digest": "f27bdce370aa7419251a18f664e4469a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6839, "upload_time": "2019-05-27T18:37:03", "url": "https://files.pythonhosted.org/packages/14/1c/64552cbd6ba400d41cb9971aa903f3c6dc123bd040e8595cd99004a3f8bc/set-package-attribute-0.2.2.tar.gz" } ], "0.2.3": [ { "comment_text": "", "digests": { "md5": "13f648641a7ddf46b8746825a0b424b9", "sha256": "a382244d1ba33f44879386b8c6f9c08c4730df234d462c9f15e3a5d8b4b2145c" }, "downloads": -1, "filename": "set-package-attribute-0.2.3.tar.gz", "has_sig": false, "md5_digest": "13f648641a7ddf46b8746825a0b424b9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6815, "upload_time": "2019-05-27T18:53:50", "url": "https://files.pythonhosted.org/packages/57/a9/a9079c5b4b0382725413c1639d7d96b6989f45616d1f8cd176a81572f279/set-package-attribute-0.2.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "13f648641a7ddf46b8746825a0b424b9", "sha256": "a382244d1ba33f44879386b8c6f9c08c4730df234d462c9f15e3a5d8b4b2145c" }, "downloads": -1, "filename": "set-package-attribute-0.2.3.tar.gz", "has_sig": false, "md5_digest": "13f648641a7ddf46b8746825a0b424b9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6815, "upload_time": "2019-05-27T18:53:50", "url": "https://files.pythonhosted.org/packages/57/a9/a9079c5b4b0382725413c1639d7d96b6989f45616d1f8cd176a81572f279/set-package-attribute-0.2.3.tar.gz" } ] }