Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sshh12/nb_autoimports
Automatically add imports when a notebook raises a NameError.
https://github.com/sshh12/nb_autoimports
auto-import data-science-tools jupyter-notebook
Last synced: 7 days ago
JSON representation
Automatically add imports when a notebook raises a NameError.
- Host: GitHub
- URL: https://github.com/sshh12/nb_autoimports
- Owner: sshh12
- License: mit
- Created: 2021-06-05T14:42:02.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-06-08T23:18:17.000Z (over 3 years ago)
- Last Synced: 2024-12-22T05:21:32.743Z (2 months ago)
- Topics: auto-import, data-science-tools, jupyter-notebook
- Language: Python
- Homepage:
- Size: 13.7 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# nb_autoimports
## Install
`$ pip install git+https://github.com/sshh12/nb_autoimports --upgrade`
## Usage
Load with `%load_ext nb_autoimports` and create a cell with just `# autoimport:`. It's best to keep this cell seperate from other code since it's contents will be overridden by this extension.
### Fix basic imports
_See [common_index.py](https://github.com/sshh12/nb_autoimports/blob/main/nb_autoimports/common_index.py) for built-in aliases._

### Fix and rerun

### Import from custom modules
_Include import names as a comma separated list. The order listed will be used as the lookup order._

## More built-in imports
Fill free to PR an update [common_index.py](https://github.com/sshh12/nb_autoimports/blob/main/nb_autoimports/common_index.py).