[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-10377":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":17,"stars30d":18,"stars90d":16,"forks30d":16,"starsTrendScore":16,"compositeScore":19,"rankGlobal":10,"rankLanguage":10,"license":20,"archived":21,"fork":21,"defaultBranch":22,"hasWiki":23,"hasPages":23,"topics":24,"createdAt":10,"pushedAt":10,"updatedAt":35,"readmeContent":36,"aiSummary":37,"trendingCount":16,"starSnapshotCount":16,"syncStatus":17,"lastSyncTime":38,"discoverSource":39},10377,"isort","PyCQA\u002Fisort","PyCQA","A Python utility \u002F library to sort imports.","https:\u002F\u002Fisort.readthedocs.io\u002F",null,"Python",6945,647,43,96,0,2,14,66.83,"MIT License",false,"main",true,[25,26,27,28,29,5,30,31,32,33,34],"auto-formatter","cleaner","cli","formatter","hacktoberfest","linter","python","python-utility","python3","sorting-imports","2026-06-12 04:00:50","[![isort - isort your imports, so you don't have to.](https:\u002F\u002Fraw.githubusercontent.com\u002Fpycqa\u002Fisort\u002Fmain\u002Fart\u002Flogo_large.png)](https:\u002F\u002Fisort.readthedocs.io\u002F)\n\n------------------------------------------------------------------------\n\n[![PyPI version](https:\u002F\u002Fbadge.fury.io\u002Fpy\u002Fisort.svg)](https:\u002F\u002Fbadge.fury.io\u002Fpy\u002Fisort)\n[![Python Version](https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fpyversions\u002Fisort)][pypi status]\n[![CI](https:\u002F\u002Fgithub.com\u002FPyCQA\u002Fisort\u002Factions\u002Fworkflows\u002Fcontinuous-integration.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002FPyCQA\u002Fisort\u002Factions\u002Fworkflows\u002Fcontinuous-integration.yml)\n[![Code coverage Status](https:\u002F\u002Fcodecov.io\u002Fgh\u002Fpycqa\u002Fisort\u002Fbranch\u002Fmain\u002Fgraph\u002Fbadge.svg)](https:\u002F\u002Fcodecov.io\u002Fgh\u002Fpycqa\u002Fisort)\n[![License](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Flicense\u002Fmashape\u002Fapistatus.svg)](https:\u002F\u002Fpypi.org\u002Fproject\u002Fisort\u002F)\n[![Downloads](https:\u002F\u002Fpepy.tech\u002Fbadge\u002Fisort)](https:\u002F\u002Fpepy.tech\u002Fproject\u002Fisort)\n[![Code style: black](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fcode%20style-black-000000.svg)](https:\u002F\u002Fgithub.com\u002Fpsf\u002Fblack)\n[![Imports: isort](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fimports-isort-%231674b1?style=flat&labelColor=ef8336)](https:\u002F\u002Fisort.readthedocs.io\u002F)\n[![DeepSource](https:\u002F\u002Fstatic.deepsource.io\u002Fdeepsource-badge-light-mini.svg)](https:\u002F\u002Fdeepsource.io\u002Fgh\u002Fpycqa\u002Fisort\u002F?ref=repository-badge)\n\n[pypi status]: https:\u002F\u002Fpypi.org\u002Fproject\u002Fisort\u002F\n_________________\n\n[Read Latest Documentation](https:\u002F\u002Fisort.readthedocs.io\u002F) - [Browse GitHub Code Repository](https:\u002F\u002Fgithub.com\u002Fpycqa\u002Fisort\u002F)\n_________________\n\n# isort your imports, so you don't have to.\n\nisort is a Python utility \u002F library to sort imports alphabetically and\nautomatically separate into sections and by type. It provides a command line\nutility, Python library and [plugins for various\neditors](https:\u002F\u002Fgithub.com\u002Fpycqa\u002Fisort\u002Fwiki\u002Fisort-Plugins) to\nquickly sort all your imports. It requires Python 3.10+ to run but\nsupports formatting Python 2 code too.\n\n- [Try isort now from your browser!](..\u002Fdocs\u002Fquick_start\u002F0.-try.md)\n- [Using black? See the isort and black compatibility guide.](..\u002Fdocs\u002Fconfiguration\u002Fblack_compatibility.md)\n- [isort has official support for pre-commit!](..\u002Fdocs\u002Fconfiguration\u002Fpre-commit.md)\n\n![Example Usage](https:\u002F\u002Fraw.github.com\u002Fpycqa\u002Fisort\u002Fmain\u002Fexample.gif)\n\nBefore isort:\n\n```python\nfrom my_lib import Object\n\nimport os\n\nfrom my_lib import Object3\n\nfrom my_lib import Object2\n\nimport sys\n\nfrom third_party import lib15, lib1, lib2, lib3, lib4, lib5, lib6, lib7, lib8, lib9, lib10, lib11, lib12, lib13, lib14\n\nimport sys\n\nfrom __future__ import absolute_import\n\nfrom third_party import lib3\n\nprint(\"Hey\")\nprint(\"yo\")\n```\n\nAfter isort:\n\n```python\nfrom __future__ import absolute_import\n\nimport os\nimport sys\n\nfrom third_party import (lib1, lib2, lib3, lib4, lib5, lib6, lib7, lib8,\n                         lib9, lib10, lib11, lib12, lib13, lib14, lib15)\n\nfrom my_lib import Object, Object2, Object3\n\nprint(\"Hey\")\nprint(\"yo\")\n```\n\n## Installing isort\n\nInstalling isort is as simple as:\n\n```bash\npip install isort\n```\n\n## Using isort\n\n**From the command line**:\n\nTo run on specific files:\n\n```bash\nisort mypythonfile.py mypythonfile2.py\n```\n\nTo apply recursively:\n\n```bash\nisort .\n```\n\nIf [globstar](https:\u002F\u002Fwww.gnu.org\u002Fsoftware\u002Fbash\u002Fmanual\u002Fhtml_node\u002FThe-Shopt-Builtin.html)\nis enabled, `isort .` is equivalent to:\n\n```bash\nisort **\u002F*.py\n```\n\nTo view proposed changes without applying them:\n\n```bash\nisort mypythonfile.py --diff\n```\n\nFinally, to atomically run isort against a project, only applying\nchanges if they don't introduce syntax errors:\n\n```bash\nisort --atomic .\n```\n\n(Note: this is disabled by default, as it prevents isort from\nrunning against code written using a different version of Python.)\n\n**From within Python**:\n\n```python\nimport isort\n\nisort.file(\"pythonfile.py\")\n```\n\nor:\n\n```python\nimport isort\n\nsorted_code = isort.code(\"import b\\nimport a\\n\")\n```\n\n## Installing isort's for your preferred text editor\n\nSeveral plugins have been written that enable to use isort from within a\nvariety of text-editors. You can find a full list of them [on the isort\nwiki](https:\u002F\u002Fgithub.com\u002Fpycqa\u002Fisort\u002Fwiki\u002Fisort-Plugins).\nAdditionally, I will enthusiastically accept pull requests that include\nplugins for other text editors and add documentation for them as I am\nnotified.\n\n## Multi line output modes\n\nYou will notice above the \\\"multi\\_line\\_output\\\" setting. This setting\ndefines how from imports wrap when they extend past the line\\_length\nlimit and has [12 possible settings](..\u002Fdocs\u002Fconfiguration\u002Fmulti_line_output_modes.md).\n\n## Indentation\n\nTo change the how constant indents appear - simply change the\nindent property with the following accepted formats:\n\n-   Number of spaces you would like. For example: 4 would cause standard\n    4 space indentation.\n-   Tab\n-   A verbatim string with quotes around it.\n\nFor example:\n\n```python\n\"    \"\n```\n\nis equivalent to 4.\n\nFor the import styles that use parentheses, you can control whether or\nnot to include a trailing comma after the last import with the\n`include_trailing_comma` option (defaults to `False`).\n\n## Intelligently Balanced Multi-line Imports\n\nAs of isort 3.1.0 support for balanced multi-line imports has been\nadded. With this enabled isort will dynamically change the import length\nto the one that produces the most balanced grid, while staying below the\nmaximum import length defined.\n\nExample:\n\n```python\nfrom __future__ import (absolute_import, division,\n                        print_function, unicode_literals)\n```\n\nWill be produced instead of:\n\n```python\nfrom __future__ import (absolute_import, division, print_function,\n                        unicode_literals)\n```\n\nTo enable this set `balanced_wrapping` to `True` in your config or pass\nthe `-e` option into the command line utility.\n\n## Custom Sections and Ordering\n\nisort provides configuration options to change almost every aspect of how\nimports are organized, ordered, or grouped together in sections.\n\n[Click here](..\u002Fdocs\u002Fconfiguration\u002Fcustom_sections_and_ordering.md) for an overview of all these options.\n\n## Skip processing of imports (outside of configuration)\n\nTo make isort ignore a single import simply add a comment at the end of\nthe import line containing the text `isort:skip`:\n\n```python\nimport module  # isort:skip\n```\n\nor:\n\n```python\nfrom xyz import (abc,  # isort:skip\n                 yo,\n                 hey)\n```\n\nTo make isort skip an entire file simply add `isort:skip_file` to the\nmodule's doc string:\n\n```python\n\"\"\" my_module.py\n    Best module ever\n\n   isort:skip_file\n\"\"\"\n\nimport b\nimport a\n```\n\n## Adding or removing an import from multiple files\n\nisort can be ran or configured to add \u002F remove imports automatically.\n\n[See a complete guide here.](..\u002Fdocs\u002Fconfiguration\u002Fadd_or_remove_imports.md)\n\n## Using isort to verify code\n\nThe `--check-only` option\n-------------------------\n\nisort can also be used to verify that code is correctly formatted\nby running it with `-c`. Any files that contain incorrectly sorted\nand\u002For formatted imports will be outputted to `stderr`.\n\n```bash\nisort **\u002F*.py -c -v\n\nSUCCESS: \u002Fhome\u002Ftimothy\u002FProjects\u002FOpen_Source\u002Fisort\u002Fisort_kate_plugin.py Everything Looks Good!\nERROR: \u002Fhome\u002Ftimothy\u002FProjects\u002FOpen_Source\u002Fisort\u002Fisort\u002Fisort.py Imports are incorrectly sorted.\n```\n\nOne great place this can be used is with a pre-commit git hook, such as\nthis one by \\@acdha:\n\n\u003Chttps:\u002F\u002Fgist.github.com\u002Facdha\u002F8717683>\n\nThis can help to ensure a certain level of code quality throughout a\nproject.\n\n## Git hook\n\nisort provides a hook function that can be integrated into your Git\npre-commit script to check Python code before committing.\n\n[More info here.](..\u002Fdocs\u002Fconfiguration\u002Fgit_hook.md)\n\n## Spread the word\n\n[![Imports: isort](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fimports-isort-%231674b1?style=flat&labelColor=ef8336)](https:\u002F\u002Fisort.readthedocs.io\u002F)\n\nPlace this badge at the top of your repository to let others know your project uses isort.\n\nFor README.md:\n\n```markdown\n[![Imports: isort](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fimports-isort-%231674b1?style=flat&labelColor=ef8336)](https:\u002F\u002Fisort.readthedocs.io\u002F)\n```\n\nOr README.rst:\n\n```rst\n.. image:: https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fimports-isort-%231674b1?style=flat&labelColor=ef8336\n    :target: https:\u002F\u002Fisort.readthedocs.io\u002F\n```\n\n## Security contact information\n\nTo report a security vulnerability, please use the [Tidelift security\ncontact](https:\u002F\u002Ftidelift.com\u002Fsecurity). Tidelift will coordinate the\nfix and disclosure.\n\n## Why isort?\n\nisort simply stands for import sort. It was originally called\n\"sortImports\" however I got tired of typing the extra characters and\ncame to the realization camelCase is not pythonic.\n\nI wrote isort because in an organization I used to work in the manager\ncame in one day and decided all code must have alphabetically sorted\nimports. The code base was huge - and he meant for us to do it by hand.\nHowever, being a programmer - I\\'m too lazy to spend 8 hours mindlessly\nperforming a function, but not too lazy to spend 16 hours automating it.\nI was given permission to open source sortImports and here we are :)\n\n------------------------------------------------------------------------\n\n[Get professionally supported isort with the Tidelift\nSubscription](https:\u002F\u002Ftidelift.com\u002Fsubscription\u002Fpkg\u002Fpypi-isort?utm_source=pypi-isort&utm_medium=referral&utm_campaign=readme)\n\nProfessional support for isort is available as part of the [Tidelift\nSubscription](https:\u002F\u002Ftidelift.com\u002Fsubscription\u002Fpkg\u002Fpypi-isort?utm_source=pypi-isort&utm_medium=referral&utm_campaign=readme).\nTidelift gives software development teams a single source for purchasing\nand maintaining their software, with professional grade assurances from\nthe experts who know it best, while seamlessly integrating with existing\ntools.\n\n------------------------------------------------------------------------\n\nThanks and I hope you find isort useful!\n\n~Timothy Crosley\n","isort 是一个用于自动排序 Python 导入语句的工具\u002F库。它能够将导入语句按字母顺序排列，并根据类型和来源自动分组，从而提高代码的可读性和一致性。isort 支持作为命令行工具、Python 库以及多种编辑器插件使用，兼容 Python 2 和 3（运行时需 Python 3.10+）。此项目适用于需要保持代码整洁规范的各种开发场景，特别是团队协作中统一编码风格的需求。","2026-06-11 03:28:02","top_topic"]