IPython Extension: ipython-suggestions
(i) Number one feature: system wide symbol searching! When ipython is loaded, suggestions module will scan your python paths for symbols and will create a cache. On the author's old 2008 computer (this readme is from 2017), 50000 symbols load in 10 seconds. But then you get a very easy way to import any symbol, without typing or remembering the entrine import path. First example:
In [1]: %findsymbol DecisionTreeClasifir # two typos here on purpose Out[1]: 0 (C) from sklearn.tree import DecisionTreeClassifier
In [2]: %suggestion 0 from sklearn.tree import DecisionTreeClassifier # it's now imported!
%findsymbol searches string up to two character edits (deletion, substitution, transpose and insertion).
Second example:
In [1]: %findsymbol pypl # now hit tab!
[this completes to:]
In [1]: %findsymbol pyplot...matplotlib # press enter now.
from matplotlib import pyplot
[pyplot is now imported]
Even better example:
In [1]: %findsymbol pypl # now hit tab!
[this completes to:]
In [1]: %findsymbol pyplot...matplotlib
[now add -as parameter]
In [1]: %findsymbol pyplot...matplotlib -as plt
from matplotlib import pyplot as plt
[pyplot is now imported as plt]
The completions offered by pressing tab in a %findsymbol line are all the symbols that begin with what you wrote. Note that this is case-sensitive.
This also works in jupyter :)
(ii) Get suggestions on misspelled names:
In [1]: my_awesome_variable = 10
In [2]: 10 * my_awsome_variable ** 3
NameError Traceback (most recent call last) in () ----> 1 10 * my_awsome_variable ** 3
NameError: name 'my_awsome_variable' is not defined Did you mean: 0 my_awesome_variable
In [3]: %suggestion 0 [ipython automatically fills the next line] In [4]: 10 * my_awesome_variable ** 3
Auto-filling of corrected code currently only works inside the shell and not in jupyter.
Installation
From pypi:
pip install ipython-suggestions
Or directly from source:
pip install git+https://github.com/drorspei/ipython-suggestions
then append the output of ipython -m ipython_suggestions
to the output of ipython profile locate (typically
~/.ipython/profile_default/ipython_config.py).
Metadata
Release files for ipython-suggestions 1.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ipython_suggestions-1.0.4.tar.gz | 16.1 kB | Without provenance | Details for ipython_suggestions-1.0.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ipython_suggestions-1.0.4-py3-none-any.whl | Python 3 | none | any | Details for ipython_suggestions-1.0.4-py3-none-any.whl |
Total release size: 32.8 kB
Release files / ipython_suggestions-1.0.4.tar.gz
| Download URL | ipython_suggestions-1.0.4.tar.gz |
|---|---|
| Size | 16.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d8fa732d06e4d8ce38eefc855112e237f7125f399cf91a8f99b490aa4bf1fb24
|
|
BLAKE2b-256 checksum How to use checksums |
839513798a1427f8c4827a48c86981c49728835f86252a3eb23fe04cb01e6cfa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Release files / ipython_suggestions-1.0.4-py3-none-any.whl
| Download URL | ipython_suggestions-1.0.4-py3-none-any.whl |
|---|---|
| Size | 16.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6fa233c5c5b6f93e2778f701bbc8bfe0e22370e6d25b457297ec3c3be970102d
|
|
BLAKE2b-256 checksum How to use checksums |
f11b791eecdee57dbbdf63e0a258ecd0b6b1c21a82ce04a0148ad47943baf3fb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Security for ipython-suggestions 1.0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.