{"id":15014764,"url":"https://github.com/aaronc81/ipython-auto-import","last_synced_at":"2025-04-09T19:23:24.011Z","repository":{"id":98729705,"uuid":"54492466","full_name":"AaronC81/ipython-auto-import","owner":"AaronC81","description":":inbox_tray: Automatically import a Python library in IPython when you forget to import it","archived":false,"fork":false,"pushed_at":"2016-07-30T17:10:34.000Z","size":21,"stargazers_count":54,"open_issues_count":3,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-02T10:33:07.648Z","etag":null,"topics":["ipython","python","python3"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AaronC81.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2016-03-22T16:49:02.000Z","updated_at":"2024-12-20T20:42:16.000Z","dependencies_parsed_at":"2023-05-25T01:15:26.879Z","dependency_job_id":null,"html_url":"https://github.com/AaronC81/ipython-auto-import","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/AaronC81%2Fipython-auto-import","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AaronC81%2Fipython-auto-import/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AaronC81%2Fipython-auto-import/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AaronC81%2Fipython-auto-import/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AaronC81","download_url":"https://codeload.github.com/AaronC81/ipython-auto-import/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248095937,"owners_count":21046945,"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":["ipython","python","python3"],"created_at":"2024-09-24T19:46:03.716Z","updated_at":"2025-04-09T19:23:23.985Z","avatar_url":"https://github.com/AaronC81.png","language":"Python","readme":"# ipython-auto-import\n\nHow many times have you quickly wanted to test something, only to do this?\n\n```\nIn [1]: df = pandas.read_clipboard()\n---------------------------------------------------------------------------\nNameError                                 Traceback (most recent call last)\n\u003cipython-input-1-45ec783f831b\u003e in \u003cmodule\u003e()\n----\u003e 1 df = pandas.read_clipboard()\n\nNameError: name 'pandas' is not defined\n\nIn [2]: import pandas # *sigh*\n\nIn [3]: df = pandas.read_clipboard()\n```\n\nInspired by [this SO question](http://stackoverflow.com/questions/36112275/make-ipython-import-what-i-mean/36116171#36116171), you'll never need to import a module again in IPython!\n\n```\nIn [1]: pandas.read_clipboard()\n---------------------------------------------------------------------------\nNameError                                 Traceback (most recent call last)\n\u003cipython-input-1-4c32fab697e6\u003e in \u003cmodule\u003e()\n----\u003e 1 pandas.read_clipboard()\n\nNameError: name 'pandas' is not defined\nAutoImport: Imported referenced module \"pandas\", will retry\n---------------------------------------------------------------------------\nOut[1]:\n       First,Last\n0         Foo,Bar\n1  John,Appleseed\n```\n\nThe first time you reference a module, it imports it auto-magically! Don't have the module installed? You can `pip install` it right from IPython.\n\n## Installation\n\n**NOTE**: It's recommended that you install `colorama` for best results: `pip install colorama`\n\n### Easy way\nClone the repo and run `install.py`.\n\n### Hard way\nAdd `import_wrapper.py` to `~/.ipython/extensions`, then call `%load_ext import_wrapper` either at the IPython prompt, or add\n```\nc.InteractiveShellApp.exec_lines.append(\"%load_ext import_wrapper\")\n```\nat the end of `~/.ipython/profile_default/ipython_config.py`.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faaronc81%2Fipython-auto-import","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faaronc81%2Fipython-auto-import","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faaronc81%2Fipython-auto-import/lists"}