How to create and install custom Python libraries in Microsoft Fabric

Поділитися
Вставка
  • Опубліковано 3 лип 2024
  • You've probably used %pip install to include open source libraries in your Fabric notebooks, but did you know you can also easily install your own custom Python libraries?
    This end-to-end walk through shows you how to create and package your own code in custom libraries in a Fabric Lakehouse. Packaging your code in libraries encourages reusability and reduces the need to paste commonly used code snippets into every new notebook.
    The demo scenario uses a custom library to package code that fetches secrets from Azure Key Vault into my Python notebooks.
    See my blog for additional info and source code:
    robkerr.ai/fabric-custom-libr...
    0:00 Introduction
    1:19 Orgininal Code Cell
    2:41 Create the Python Package
    6:24 Microsoft Docs
    7:16 Install the Package
    8:09 Run the Package
    11:07 Shortcuts
    12:58 Summary
  • Наука та технологія

КОМЕНТАРІ • 5

  • @jamesholloway9332
    @jamesholloway9332 8 днів тому

    Super helpful and straightforward, thank you! I'm just getting started with Fabric - would love to see some content on managing libraries across environments (dev,test,prod) and also your own style of splitting a Fabric platform over multiple workspaces and into various lakehouses and warehouses!

  • @rommelsantizo
    @rommelsantizo 3 місяці тому +1

    Hi Rob, great video about how to use packages on Fabric. In fact this video make think, that we can create a new Workspace and Lakehouse called SourceCode o SharedCode as the example.
    So we will have the code isolated from the data Bronze, Silver and Gold.

    • @robkerrai
      @robkerrai  Місяць тому

      I think you could accomplish this using Fabric environments. Each environment can have different .whl files attached to it, so when you choose an environment to run your code, that code will use whatever .whl files are pre-installed in the environment.

  • @OneNI83
    @OneNI83 Місяць тому

    Nice Share.
    Is there a way to decrypt the wheel file so we can see .py scripts in locally that is obtained from elsewhere. Would you have some resources on this?

    • @robkerrai
      @robkerrai  Місяць тому +1

      If I'm not mistaken .whl files aren't encrypted. Try changing the extension to .zip and using unzip to get at teh code within the .whl file.