nbdev
nbdev copied to clipboard
How to export to top level of package?
MWE
$ mkdir example
$ cd example
$ nbdev_new
$ cd nbs
$ code 00_core.ipynb
How can I use default_exp
to instead of exporting to example.core
I can export everything to the top level of the package so I can just go from example import ...
You need to edit your __init__.py
.
Edit your __init__.py
to something like this
from .core import *
from .foo import *
# and so on
@deven367 isn't that file autogenerated? So shouldn't there be a way to do that without manually editing it?
The file is auto generated, but it is up to the creator of the package to decide the import structure of the entire package.