{ "info": { "author": "Antony Lee", "author_email": "", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Framework :: IPython", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3" ], "description": "ipython-autoimport\n==================\n\n|Python33| |Travis| |CodeCov|\n\n.. |Python33| image:: https://img.shields.io/badge/python-3.3%2B-blue.svg\n.. |Travis| image:: https://travis-ci.org/anntzer/ipython-autoimport.svg?branch=master\n :target: https://travis-ci.org/anntzer/ipython-autoimport\n.. |CodeCov| image:: https://codecov.io/gh/anntzer/ipython-autoimport/master.svg\n :target: https://codecov.io/gh/anntzer/ipython-autoimport\n\nAutomagically import missing modules in IPython: instead of ::\n\n In [1]: plt.plot([1, 2], [3, 4])\n ---------------------------------------------------------------------------\n NameError Traceback (most recent call last)\n in ()\n ----> 1 plt.plot([1, 2], [3, 4])\n\n NameError: name 'plt' is not defined\n\n In [2]: from matplotlib import pyplot as plt\n\n In [3]: plt.plot([1, 2], [3, 4])\n Out[3]: []\n\ndo what I mean::\n\n In [1]: plt.plot([1, 2], [3, 4])\n Autoimport: from matplotlib import pyplot as plt\n Out[1]: []\n\nInspired from @OrangeFlash81's `version\n`_, with many\nimprovements:\n\n- Does not rely on re-execution, but instead hooks the user namespace; thus,\n safe even in the presence of side effects, and works for tab completion and\n magics too.\n- Learns your preferred aliases (from the history).\n- Suppresses irrelevant chained tracebacks.\n- Auto-imports submodules.\n- ``pip``-installable.\n\nInstallation\n------------\n\nPick one among:\n\n.. code-block:: sh\n\n $ pip install ipython-autoimport # from PyPI\n $ pip install git+https://github.com/anntzer/ipython-autoimport # from Github\n\nthen append the output of ``python -mipython_autoimport``\nto the output of ``ipython profile locate`` (typically\n``~/.ipython/profile_default/ipython_config.py``).\n\nRun tests with ``pytest`` (tests requires ``pathlib`` on Python 3.3).\n\nLimitations\n-----------\n\nConstructs such as ::\n\n class C:\n auto_imported_value\n\nwill not work, because they are run using the class locals (rather than the\npatched locals); patching globals would not work because ``LOAD_NAME`` queries\nglobals using ``PyDict_GetItem`` exactly (note that it queries locals using\n``PyObject_GetItem``; also, ``LOAD_GLOBALS`` queries *both* globals and\nbuiltins using ``PyObject_GetItem`` so we could possibly get away with patching\nthe builtins dict instead, but that seems a bit too invasive...).\n\n\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/anntzer/ipython-autoimport", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "ipython-autoimport", "package_url": "https://pypi.org/project/ipython-autoimport/", "platform": "", "project_url": "https://pypi.org/project/ipython-autoimport/", "project_urls": { "Homepage": "https://github.com/anntzer/ipython-autoimport" }, "release_url": "https://pypi.org/project/ipython-autoimport/0.3/", "requires_dist": [ "ipython (>=4.0)", "setuptools-scm" ], "requires_python": ">=3", "summary": "Automagically import missing modules in IPython.", "version": "0.3" }, "last_serial": 3510363, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "3cfd6f206f697a8f61770772b931224f", "sha256": "b2bec34f753516f2b1d5db86b109fae107b85b31d64399aff9e399e64caf7f7c" }, "downloads": -1, "filename": "ipython_autoimport-0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "3cfd6f206f697a8f61770772b931224f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.3", "size": 4039, "upload_time": "2017-04-12T07:51:25", "url": "https://files.pythonhosted.org/packages/c0/9a/c557ab5552524b727f0ae9a09e2d82a86e788e721bcc582c1fd5b3cc72cb/ipython_autoimport-0.1-py3-none-any.whl" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "4ffc3206193310b5aa5d79969010e856", "sha256": "594c022fbfcdc2d58763c696df3b06eb1ac9792293df9c8ff90e1469b2bd4c70" }, "downloads": -1, "filename": "ipython_autoimport-0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "4ffc3206193310b5aa5d79969010e856", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6520, "upload_time": "2017-05-06T21:26:09", "url": "https://files.pythonhosted.org/packages/10/7b/d4fe45e168f4f1187de6e69142defe7b7c095dc661682d88a397b4187e14/ipython_autoimport-0.2-py3-none-any.whl" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "0117f027c879c471590a8a9e102691e9", "sha256": "6b5a4fb3f0dec728a0a695fe9f74195fc2f343d21436f18a4e79484edae8910d" }, "downloads": -1, "filename": "ipython_autoimport-0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "0117f027c879c471590a8a9e102691e9", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 7874, "upload_time": "2018-01-22T07:33:15", "url": "https://files.pythonhosted.org/packages/ae/22/d7c179b3729ca6f17e231ba195c95e9ab61a09a9e596e41d47de3986892d/ipython_autoimport-0.3-py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "0117f027c879c471590a8a9e102691e9", "sha256": "6b5a4fb3f0dec728a0a695fe9f74195fc2f343d21436f18a4e79484edae8910d" }, "downloads": -1, "filename": "ipython_autoimport-0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "0117f027c879c471590a8a9e102691e9", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 7874, "upload_time": "2018-01-22T07:33:15", "url": "https://files.pythonhosted.org/packages/ae/22/d7c179b3729ca6f17e231ba195c95e9ab61a09a9e596e41d47de3986892d/ipython_autoimport-0.3-py3-none-any.whl" } ] }