Bundle: Notebook + Library

← All samples

A .dplybundle packs a document together with its libraries in one file. The libraries are collapsed below — click to expand.

notebook.dply
1---
2version: 0.1.0
3precision: 3
4---
5# draftply Pro — Bundle demo (notebook + library in one file)
6# The library below is bundled with this document and imported here.
7import "geometry.dplylib"
8
9radius = 5
10area: circle_area(radius)
11circumference: circle_circumference(radius)
12volume: sphere_volume(radius)
geometry.dplyliblibrary
geometry.dplylib
1# geometry.dplylib — a small reusable function library.
2# A .dplybundle packages this library together with the notebook that uses it,
3# so everything travels in a single file.
4circle_area(r) = pi * r^2
5circle_circumference(r) = 2 * pi * r
6sphere_volume(r) = 4 / 3 * pi * r^3