{ "info": { "author": "Graham Binns", "author_email": "graham@outcoded.uk", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "# Python Import Guardian README\n\n## What is it?\n\n`python-import-guardian` is a static-analysis import guardian for Python. It\ncan be used to control explictly which Python modules and packages can be\nimported by a given set of modules and packages in your project.\n\n## When is this useful?\n\nLet's say you have a project with two major components \u2014 a client and a server.\nBoth of these components live in the same repository (for the sake of argument)\nand both use a common set of shared code for various functions \u2014 for example to\ndetermine how certain hashes are calculated or some such.\n\nThe code may be laid out thus:\n\n```\n /myproject\n |\n |- client/\n |- server/\n |- shared/\n```\n\nConceptually, you only ever want `client` and `shared` code to be installed on\nclient machines and `server` and `shared` code on server machines. Modules in\n`client` and `server` may import from `shared`, but not from each other, and\n`shared` may import from neither \u2014 this ensures that you have a good separation\nof concerns between client and server code whilst maintaining some shared code\nand good DRY principles.\n\n`python-import-guardian` allows you to define how you want these modules to\nrelate to each other when it comes to which module can import what from where.\nFor our example project, a simple `importguardian.json` file at the top of the\nproject tree might look like this:\n\n```\n {\n \"forbidden_modules\": {\n \"server\": [\n \"client\",\n \"shared\"\n ],\n \"client\": [\n \"server\",\n \"shared\"\n ]\n\n }\n }\n```\n\nThe `forbidden_modules` declaration here maps Python modules to a list of the\nmodules or packages which may not import them. So in this case: `server` may\nnot be imported by `client` or `shared`, and `client` may not be imported by\n`server` or `shared`. `forbidden_modules` is a blacklist, so `shared` can be\nimported by anything because it isn't mentioned as a forbidden module.\n\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "https://gitlab.com/gmb/python-import-guardian/-/archive/master/python-import-guardian-master.tar.gz", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://gitlab.com/gmb/python-import-guardian", "keywords": "import,guardian,static-analysis", "license": "", "maintainer": "", "maintainer_email": "", "name": "python-import-guardian", "package_url": "https://pypi.org/project/python-import-guardian/", "platform": "", "project_url": "https://pypi.org/project/python-import-guardian/", "project_urls": { "Download": "https://gitlab.com/gmb/python-import-guardian/-/archive/master/python-import-guardian-master.tar.gz", "Homepage": "https://gitlab.com/gmb/python-import-guardian" }, "release_url": "https://pypi.org/project/python-import-guardian/0.1.3/", "requires_dist": null, "requires_python": "", "summary": "A static-analysis Python import guardian.", "version": "0.1.3" }, "last_serial": 4516080, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "4d63e4892ce6f083e33527d646b96b31", "sha256": "332d69a072b678763b3dc340182a8a2ef8ac151821e48b37a120a2c96d84c103" }, "downloads": -1, "filename": "python-import-guardian-0.0.1.tar.gz", "has_sig": false, "md5_digest": "4d63e4892ce6f083e33527d646b96b31", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3937, "upload_time": "2018-09-24T07:48:00", "url": "https://files.pythonhosted.org/packages/57/a5/c80bcb746a67e34d9bedaecb093fd32c0513d7d7e218426066ae16901a84/python-import-guardian-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "952093e3428a9583b23d153b771dcbec", "sha256": "f64485c75eb06994d73ca0ab11b2210e43f77891f464024a917fc877f1436f66" }, "downloads": -1, "filename": "python-import-guardian-0.0.2.tar.gz", "has_sig": false, "md5_digest": "952093e3428a9583b23d153b771dcbec", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5451, "upload_time": "2018-09-24T07:48:02", "url": "https://files.pythonhosted.org/packages/b8/d7/cace6644d53c78bf40c6f0644166c1a1dd1a0aefb7ed1a8e6099484440a2/python-import-guardian-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "de41154f9c3610f49ac7aa1fb6c67ed8", "sha256": "f07deaa01116a68147e26a62a1b85a80b9867172623b677c3d90fe5617018062" }, "downloads": -1, "filename": "python-import-guardian-0.0.3.tar.gz", "has_sig": false, "md5_digest": "de41154f9c3610f49ac7aa1fb6c67ed8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5450, "upload_time": "2018-09-24T08:19:23", "url": "https://files.pythonhosted.org/packages/bb/50/7c3cffe78238ac5b954f24e27ea617e19a1ca7e0c07a54393fc5a1b46a40/python-import-guardian-0.0.3.tar.gz" } ], "0.1": [ { "comment_text": "", "digests": { "md5": "b2894307a7358f3ffbb7ba70094ed2f1", "sha256": "2b3f2afaeb783278fe46b5027e04e74522e424dcd5ea86672b6c9d15840b7858" }, "downloads": -1, "filename": "python-import-guardian-0.1.tar.gz", "has_sig": false, "md5_digest": "b2894307a7358f3ffbb7ba70094ed2f1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5490, "upload_time": "2018-09-27T08:14:07", "url": "https://files.pythonhosted.org/packages/d6/51/cf64adb0ac553fc1279fb6f8dc05502c620921d5be2286d5e7f9ed3e6883/python-import-guardian-0.1.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "806a9020b0dbcc6f510dbd96097570f0", "sha256": "5f16378ed5b50714e2abd310fb838a13957f272c25a0abf0836a258aae5ba92f" }, "downloads": -1, "filename": "python-import-guardian-0.1.1.tar.gz", "has_sig": false, "md5_digest": "806a9020b0dbcc6f510dbd96097570f0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5479, "upload_time": "2018-10-23T13:18:01", "url": "https://files.pythonhosted.org/packages/d5/85/3891a221c1e55785a2d97d9f0b6076a8902ccff2ebc17a18cc57c47ff09f/python-import-guardian-0.1.1.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "7f7bdc5bf1ea00fffa098b79438f43a3", "sha256": "067d2fc8debff31b1cea80ea14ca7566b6085a91b57ba7561ccdb999638ac088" }, "downloads": -1, "filename": "python_import_guardian-0.1.3-py3-none-any.whl", "has_sig": false, "md5_digest": "7f7bdc5bf1ea00fffa098b79438f43a3", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8722, "upload_time": "2018-11-22T09:25:48", "url": "https://files.pythonhosted.org/packages/c3/49/a8fbbc748a6887dff8a31d56392a1f58f03de9df757b8cbbf60d613c3450/python_import_guardian-0.1.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7b81bf37d13b38a0fd6a39474adc5288", "sha256": "6a601b49ad9219c95cfb860192fcd5c32331d53c731cb7a2346dfea45b9a8025" }, "downloads": -1, "filename": "python-import-guardian-0.1.3.tar.gz", "has_sig": false, "md5_digest": "7b81bf37d13b38a0fd6a39474adc5288", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6049, "upload_time": "2018-11-22T09:25:50", "url": "https://files.pythonhosted.org/packages/58/a2/82e4040feda47bfeb8b4edaf51158b8aec721f37808e8aad5820836e708e/python-import-guardian-0.1.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "7f7bdc5bf1ea00fffa098b79438f43a3", "sha256": "067d2fc8debff31b1cea80ea14ca7566b6085a91b57ba7561ccdb999638ac088" }, "downloads": -1, "filename": "python_import_guardian-0.1.3-py3-none-any.whl", "has_sig": false, "md5_digest": "7f7bdc5bf1ea00fffa098b79438f43a3", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8722, "upload_time": "2018-11-22T09:25:48", "url": "https://files.pythonhosted.org/packages/c3/49/a8fbbc748a6887dff8a31d56392a1f58f03de9df757b8cbbf60d613c3450/python_import_guardian-0.1.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7b81bf37d13b38a0fd6a39474adc5288", "sha256": "6a601b49ad9219c95cfb860192fcd5c32331d53c731cb7a2346dfea45b9a8025" }, "downloads": -1, "filename": "python-import-guardian-0.1.3.tar.gz", "has_sig": false, "md5_digest": "7b81bf37d13b38a0fd6a39474adc5288", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6049, "upload_time": "2018-11-22T09:25:50", "url": "https://files.pythonhosted.org/packages/58/a2/82e4040feda47bfeb8b4edaf51158b8aec721f37808e8aad5820836e708e/python-import-guardian-0.1.3.tar.gz" } ] }