Libify (version 0.78) is a Python library designed to simplify the process of importing Databricks notebooks as modules. It enables nesting of notebook imports for complex workflows and supports Databricks Runtime Version 5.5 and above. The library was last released in September 2020, indicating an infrequent release cadence and a focus on maintaining existing functionality rather than active development.
Install & Compatibility
Where this runs
tested against v0.78 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.920 runs
installs and imports cleanly · install 0.0s · import 0.000s · 17.8MB
glibcpy 3.10–3.920 runs
installs and imports cleanly · install 1.6s · import 0.000s · 18MB
16MB installed
● package 16MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
To use Libify, you need two types of notebooks: an 'importee' (the one providing functions) and an 'importer' (the one consuming them). The 'importee' notebook must end with a specific `libify.exporter` call to make its global scope available. The 'importer' notebook then uses `libify.importer` to load the target notebook as a module, allowing access to its defined functions and variables using dot notation.
# --- In the notebook to be imported (e.g., '/Users/my_user/my_functions') ---
# This cell must be the LAST cell in the notebook and contain ONLY this code.
def greet(name):
return f"Hello, {name} from imported notebook!"
def add(a, b):
return a + b
import libify
libify.exporter(globals())
# --- In the importing notebook (e.g., '/Users/my_user/main_workflow') ---
import libify
# The path should be relative to the Databricks workspace root or absolute DBFS path
my_module = libify.importer(globals(), '/Users/my_user/my_functions')
# Now you can access functions/variables defined in 'my_functions' notebook
message = my_module.greet("World")
print(message)
result = my_module.add(5, 3)
print(f"The sum is: {result}")
# Expected output in the importing notebook:
# Hello, World from imported notebook!
# The sum is: 8
Upgrade
Version history
Breaking-change detection hasn't run for this library yet.
Audit
Security & dependencies
CVE tracking and dependency tree are planned for a later release.