Forum Discussion

kwenzelmms's avatar
kwenzelmms
Frequent Visitor
1 year ago
Solved

Docstrings from Custom Library not displaying in Notebook

Hi,   I created a custom library and the Def's have docstrings.  I noticed that they aren't being displayed from within the Fabric notebooks.   Is there something that I need to do to activate them...
  • nilendraFabric's avatar
    1 year ago

    Hello kwenzelmms 

     

    Ensure docstrings use triple-quoted strings immediately following function/class declarations

    def my_function(param):
    """Display this docstring in Fabric Notebooks

    Args:
    param: Example parameter
    """
    ...


    Package libraries as `.whl` files with proper metadata in `setup.py`

     

    Create dedicated Fabric environment
    2. Add custom library through UI:
    • Workspace > New > Environment > Add from PyPI/upload WHL
    3. Publish environment before notebook use
    4. Select environment in notebook toolbar

    In notebook :

     

    import importlib
    importlib.reload(mylib)

    If this is helpful please accept the answer