{ "info": { "author": "David Seddon", "author_email": "david@seddonym.me", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: Microsoft :: Windows", "Operating System :: POSIX", "Operating System :: Unix", "Programming Language :: Python", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: Implementation :: CPython", "Topic :: Utilities" ], "description": "=============\nImport Linter\n=============\n\n.. image:: https://img.shields.io/pypi/v/import-linter.svg\n :target: https://pypi.org/project/import-linter\n\n.. image:: https://img.shields.io/pypi/pyversions/import-linter.svg\n :alt: Python versions\n :target: https://pypi.org/project/import-linter/\n\n.. image:: https://api.travis-ci.org/seddonym/import-linter.svg?branch=master\n :target: https://travis-ci.org/seddonym/import-linter\n\n\nImport Linter allows you to define and enforce rules for the imports within and between Python packages.\n\n* Free software: BSD license\n* Documentation: https://import-linter.readthedocs.io.\n\nOverview\n--------\n\nImport Linter is a command line tool to check that you are following a self-imposed\narchitecture within your Python project. It does this by analysing the imports between all the modules in one\nor more Python packages, and compares this against a set of rules that you provide in a configuration file.\n\nThe configuration file contains one or more 'contracts'. Each contract has a specific\ntype, which determines the sort of rules it will apply. For example, the ``forbidden``\ncontract type allows you to check that certain modules or packages are not imported by\nparts of your project.\n\nImport Linter is particularly useful if you are working on a complex codebase within a team,\nwhen you want to enforce a particular architectural style. In this case you can add\nImport Linter to your deployment pipeline, so that any code that does not follow\nthe architecture will fail tests.\n\nIf there isn't a built in contract type that fits your desired architecture, you can define\na custom one.\n\nQuick start\n-----------\n\nInstall Import Linter::\n\n pip install import-linter\n\nDecide on the dependency flows you wish to check. In this example, we have\ndecided to make sure that ``myproject.foo`` has dependencies on neither\n``myproject.bar`` nor ``myproject.baz``, so we will use the ``forbidden`` contract type.\n\nCreate an ``.importlinter`` file in the root of your project to define your contract(s). In this case:\n\n.. code-block:: ini\n\n [importlinter]\n root_package = myproject\n\n [importlinter:contract:1]\n name=Foo doesn't import bar or baz\n type=forbidden\n source_modules=\n myproject.foo\n forbidden_modules=\n myproject.bar\n myproject.baz\n\nNow, from your project root, run::\n\n lint-imports\n\nIf your code violates the contract, you will see an error message something like this:\n\n.. code-block:: text\n\n =============\n Import Linter\n =============\n\n ---------\n Contracts\n ---------\n\n Analyzed 23 files, 44 dependencies.\n -----------------------------------\n\n Foo doesn't import bar or baz BROKEN\n\n Contracts: 1 broken.\n\n\n ----------------\n Broken contracts\n ----------------\n\n Foo doesn't import bar or baz\n -----------------------------\n\n myproject.foo is not allowed to import myproject.bar:\n\n - myproject.foo.blue -> myproject.utils.red (l.16)\n myproject.utils.red -> myproject.utils.green (l.1)\n myproject.utils.green -> myproject.bar.yellow (l.3)", "description_content_type": "text/x-rst", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "", "keywords": "", "license": "BSD 2-Clause License", "maintainer": "", "maintainer_email": "", "name": "import-linter", "package_url": "https://pypi.org/project/import-linter/", "platform": "", "project_url": "https://pypi.org/project/import-linter/", "project_urls": { "Documentation": "https://import-linter.readthedocs.io/", "Source code": "https://github.com/seddonym/import-linter/" }, "release_url": "https://pypi.org/project/import-linter/1.0/", "requires_dist": null, "requires_python": "", "summary": "Enforces rules for the imports within and between Python packages.", "version": "1.0" }, "last_serial": 5988143, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "e6651a346423f559bdd020e436a46241", "sha256": "4d22798893e6a8d515441f6b6598ca0caf9e413202ea56bb2415ac2c7eb259de" }, "downloads": -1, "filename": "import-linter-1.0.tar.gz", "has_sig": false, "md5_digest": "e6651a346423f559bdd020e436a46241", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16057, "upload_time": "2019-10-17T07:35:24", "url": "https://files.pythonhosted.org/packages/3e/63/f013f0aa9016bdbe4543155a25a72c9c76c6eb67c61e7357d391aed17d17/import-linter-1.0.tar.gz" } ], "1.0a1": [ { "comment_text": "", "digests": { "md5": "ca15c3bdc9f3d4ad888270947c23d383", "sha256": "9552969af0beef3af9119eadb489ddc48ef0aca2bae5521c01e25633935ce6b1" }, "downloads": -1, "filename": "import-linter-1.0a1.tar.gz", "has_sig": false, "md5_digest": "ca15c3bdc9f3d4ad888270947c23d383", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1914, "upload_time": "2019-01-27T11:12:14", "url": "https://files.pythonhosted.org/packages/98/7d/165051272a9c22cfa9f5faa8c0240974a2275b3dddfe17efba24d863bf37/import-linter-1.0a1.tar.gz" } ], "1.0a2": [ { "comment_text": "", "digests": { "md5": "432ba241876ee5b2dd92a28b27864735", "sha256": "fbbd9fad202085587a6aa85cf1026b479c0bab6d91326647dee3a0abcb25cc6d" }, "downloads": -1, "filename": "import-linter-1.0a2.tar.gz", "has_sig": false, "md5_digest": "432ba241876ee5b2dd92a28b27864735", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14682, "upload_time": "2019-03-26T09:07:17", "url": "https://files.pythonhosted.org/packages/2b/88/381030d0998a1b4e1b010658f91c71dee5091f0c1b3529a2a964383cb706/import-linter-1.0a2.tar.gz" } ], "1.0a3": [ { "comment_text": "", "digests": { "md5": "5495112fd3d1852e5d78106d7b20d04e", "sha256": "a234ac2b91e759d8dd56ab8fa3206017cb7383bee0779ae326570ff3719e464c" }, "downloads": -1, "filename": "import-linter-1.0a3.tar.gz", "has_sig": false, "md5_digest": "5495112fd3d1852e5d78106d7b20d04e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14867, "upload_time": "2019-03-27T13:18:54", "url": "https://files.pythonhosted.org/packages/da/ad/2c52306a8819748232889e2a75190347caae1760bde2b7c1f541ad217043/import-linter-1.0a3.tar.gz" } ], "1.0b1": [ { "comment_text": "", "digests": { "md5": "e3f47f7cc23f129d26181f9e2c4a75ad", "sha256": "8b0f7ef250b244f9a2ecb0413e82e1447c686964339a19c019c9440231cc3fbb" }, "downloads": -1, "filename": "import-linter-1.0b1.tar.gz", "has_sig": false, "md5_digest": "e3f47f7cc23f129d26181f9e2c4a75ad", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15156, "upload_time": "2019-04-06T15:23:57", "url": "https://files.pythonhosted.org/packages/39/30/6a8da9f90c16b595d73b97c13df791d436f89e90d8e6158ae02f171583d2/import-linter-1.0b1.tar.gz" } ], "1.0b2": [ { "comment_text": "", "digests": { "md5": "ad95453646b5ad37252931d26d123f9a", "sha256": "e2d8482f83455fec9eef588b34e2e0f546434910e2b9031b818d0580f55895d7" }, "downloads": -1, "filename": "import-linter-1.0b2.tar.gz", "has_sig": false, "md5_digest": "ad95453646b5ad37252931d26d123f9a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15159, "upload_time": "2019-04-16T16:58:49", "url": "https://files.pythonhosted.org/packages/e0/9f/c5fbd99c296c8e28cea118e8eac9fbaf2d92d32945e38e9cfd3b9678ce5a/import-linter-1.0b2.tar.gz" } ], "1.0b3": [ { "comment_text": "", "digests": { "md5": "754b1c2700b0765b0c03c25fd5056a2c", "sha256": "eab0663e59b412058ce0b8fd6246c773d8c57ce97a58fd97813b72377bf3dc28" }, "downloads": -1, "filename": "import-linter-1.0b3.tar.gz", "has_sig": false, "md5_digest": "754b1c2700b0765b0c03c25fd5056a2c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15163, "upload_time": "2019-05-15T11:53:08", "url": "https://files.pythonhosted.org/packages/28/94/d48d79f1cf6f99bf635f6ffd1efae3b70bd128fceed9125beed6017de137/import-linter-1.0b3.tar.gz" } ], "1.0b4": [ { "comment_text": "", "digests": { "md5": "6c0a1c0174970ed01d380bb89e409f69", "sha256": "1dadd9ca39414f3e76ea0ff9cced10b15bf294451a6ab0aba02aa87ec712d5b9" }, "downloads": -1, "filename": "import-linter-1.0b4.tar.gz", "has_sig": false, "md5_digest": "6c0a1c0174970ed01d380bb89e409f69", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15648, "upload_time": "2019-07-03T18:59:24", "url": "https://files.pythonhosted.org/packages/61/dc/4ef7099c893b6bb5cc701da00e6678d0606f68295f8e767c1c095c6a644b/import-linter-1.0b4.tar.gz" } ], "1.0b5": [ { "comment_text": "", "digests": { "md5": "117cdc53fff1ddc1cb3852fc3a6ec866", "sha256": "10218c3386c4446ef12f0dc4524342295b17fcd1efbbe26f5298999585a56f45" }, "downloads": -1, "filename": "import-linter-1.0b5.tar.gz", "has_sig": false, "md5_digest": "117cdc53fff1ddc1cb3852fc3a6ec866", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16092, "upload_time": "2019-10-05T11:28:21", "url": "https://files.pythonhosted.org/packages/f0/f2/73386f6d4a78e293a63234ceb9df6bffbed2141e5d555c0a0bdf094bb2ef/import-linter-1.0b5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e6651a346423f559bdd020e436a46241", "sha256": "4d22798893e6a8d515441f6b6598ca0caf9e413202ea56bb2415ac2c7eb259de" }, "downloads": -1, "filename": "import-linter-1.0.tar.gz", "has_sig": false, "md5_digest": "e6651a346423f559bdd020e436a46241", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16057, "upload_time": "2019-10-17T07:35:24", "url": "https://files.pythonhosted.org/packages/3e/63/f013f0aa9016bdbe4543155a25a72c9c76c6eb67c61e7357d391aed17d17/import-linter-1.0.tar.gz" } ] }