diff --git a/src/index.js b/src/index.js
index <HASH>..<HASH> 100644
--- a/src/index.js
+++ b/src/index.js
@@ -1,4 +1,26 @@
 export {RuntimeError} from "./errors";
-export {default as Library} from "./library";
+import {default as Library} from "./library";
 export {default as Notebook} from "./notebook";
-export {default as Runtime} from "./runtime";
+import {default as Runtime} from "./runtime";
+export {Library, Runtime};
+
+export function load(notebookModule, nodes = {}) {
+  const {modules} = notebookModule;
+  const runtime = new Runtime(new Library());
+  const moduleMap = new Map();
+
+  modules.forEach(m =>  moduleMap.set(m.id, runtime.module()));
+
+  modules.forEach(m => {
+    const module = moduleMap.get(m.id);
+    m.variables.forEach(v => {
+      const node = m.id === "__main__" ? nodes[v.name] : null;
+      const variable = module.variable(node);
+      if (v.from) {
+        variable.import(v.name, v.remote, moduleMap.get(v.from));
+      } else {
+        variable.define(v.name, v.inputs, v.value);
+      }
+    });
+  });
+}
First working draft of a flat load function.