Tutorial

A nbdev notebook without an associated library

You can use nbdev to render docs without creating a library if you like.

Using show_doc

nbdev.showdoc.show_doc offers a nice way to render documentation for APIs:

Here is L from fastcore


source

L

 L (items=None, *rest, use_list=False, match=None)

Behaves like a list of items but can also index with list of indices or masks

Auto-linking with Backticks

One cool thing about documentation functionality is the ability to link to other nbdev built projects with backtick notation. For example the following text will be automatically turned into a link: fastcore.foundation.L.cycle:

Noticed how L.cycle is automatically linked to the correct documentation in the sentence above!

Nbdev Directives

You can use nbdev directives as well. For example you will not see the below code block, because it uses the #|hide directive:

Unit Tests

You can still leverage the unit testing framework of nbdev with nbdev_test even if you have no library!

assert 'foo' != 'bar'
!nbdev_test
Success.