Metadata-Version: 2.1
Name: ipython-reload
Version: 0.0.1
Summary: IPython magic command to reload modules on demand
Home-page: https://github.com/sivel/ipython-reload
Author: Matt Martz
Author-email: matt@sivel.net
License: UNKNOWN
Project-URL: Bug Reports, https://github.com/sivel/ipython-reload/issues
Project-URL: Source, https://github.com/sivel/ipython-reload/
Keywords: ipython magic
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Requires-Python: >=3.5, <4
Description-Content-Type: text/markdown

# ipython-reload
IPython magic command to reload modules on demand

## Install

```shell
pip install ipython-reload
```

## Use

```
In [1]: %load_ext ipython_reload

In [2]: from foo import some_function

In [3]: some_function()
Out[3]: 42

In [4]: # open foo.py in an editor and change some_function to return 43

In [5]: %reload some_function

In [6]: some_function()
Out[6]: 43
```

The `%reload` magic can reload modules not directly imported, imported modules
in the local namespace, and imported variables.

Reloading imported variables may produce unexpected results if the name is
generic, such as in the case of `__version__`. Python does not track the source
of where a variable was defined, so this code loops all imported modules, and
looks for a matching name, that is the same type as the variable you want to
reload. If you have imported a _variable_ using `from foo import bar as baz`
this functionality will not work.


