{"id":13937497,"url":"https://github.com/alecthomas/SublimePythonImportMagic","last_synced_at":"2025-07-19T23:32:58.305Z","repository":{"id":14787681,"uuid":"17509624","full_name":"alecthomas/SublimePythonImportMagic","owner":"alecthomas","description":"This Sublime Text 2 plugin attempts to automatically manage Python imports.","archived":false,"fork":false,"pushed_at":"2023-12-02T01:45:30.000Z","size":1184,"stargazers_count":34,"open_issues_count":3,"forks_count":3,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-11-18T22:33:16.277Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"PatOShea/ChocolateySaltMinion","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alecthomas.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-03-07T09:47:51.000Z","updated_at":"2024-05-02T02:34:01.000Z","dependencies_parsed_at":"2024-10-27T15:44:12.599Z","dependency_job_id":"e70db664-10d1-4238-9b2f-f395e002c713","html_url":"https://github.com/alecthomas/SublimePythonImportMagic","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alecthomas%2FSublimePythonImportMagic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alecthomas%2FSublimePythonImportMagic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alecthomas%2FSublimePythonImportMagic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alecthomas%2FSublimePythonImportMagic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alecthomas","download_url":"https://codeload.github.com/alecthomas/SublimePythonImportMagic/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226700600,"owners_count":17668678,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-07T23:03:37.863Z","updated_at":"2024-11-27T06:30:29.065Z","avatar_url":"https://github.com/alecthomas.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# Sublime Text 3 - Python Import Magic [![image](https://secure.travis-ci.org/alecthomas/SublimePythonImportMagic.png?branch=master)](https://travis-ci.org/alecthomas/SublimePythonImportMagic)\n\nThis plugin attempts to automatically manage Python imports.\n\n**WARNING: This is a relatively complex plugin and thus may contain bugs. It may remove imports that you need. It may add imports that you don't. Use at your own risk.**\n\nIt can:\n\n- Detect and add imports for unknown symbols.\n- Remove unused imports.\n- Order imports according to PEP8.\n\nIt currently does **NOT** (but support is planned):\n\n- Detect changes to files and update its index automatically. The current workaround is to use the command palette `Python Import Magic: Reset Index`.\n\n## Example\n\n![Example of Import Magic at work](https://raw.githubusercontent.com/alecthomas/importmagic/master/importmagic.gif)\n\n## Usage\n\nThere are three ways of invoking the auto-importer:\n\n- The hotkey: `⌘⇧I` on OSX and `^⇧I` on Windows and Linux.\n- Via the command palette: `Python Import Magic: Update Imports`.\n- Setting `update_imports_on_save` to `true` in the user settings for the package. *I would not encourage use of this setting at this stage, but if you're feeling particularly brave...*\n\n\n## Configuration\n\neg.\n\n```json\n{\n    \"update_imports_on_save\": true,\n    \"python_path\": {\n        \"/Library/Python/2.7/site-packages\": \"S\",\n        \"/Users/alec/Projects/SublimePythonImportMagic/.venv/lib/python2.7/site-packages\": \"L\"\n    }\n}\n```\n\n### `update_imports_on_save = false`\n\nIf true, update imports on each save. **WARNING: This might not be a good idea.**\n\n### `index_filename = \".importmagic.idx\"`\n\nName of file to store index in.\n\n### `python_path = {\u003cpath\u003e: \u003cclassification\u003e}`\n\n**NOTE: Not implemented yet**\n\nKeys are the paths to search for Python modules. Values are how the path should be classified.\n\nPaths will also be looked up in the default Sublime configuration under the key `python_import_magic_python_path`.\n\n`\u003cclassification\u003e` is from the following table:\n\nKey | Classification\n--- | -------\n3 | Third party\nS | System\nL | Local\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falecthomas%2FSublimePythonImportMagic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falecthomas%2FSublimePythonImportMagic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falecthomas%2FSublimePythonImportMagic/lists"}