Update metadata#

You can add additional packages to be tracked right at initialization:

from nbproject import header, meta
import pandas

header(
    parent=[
        "z14KWQKD4bwE",
        "jhvyoIrxoeSz",
    ],
    pypackage="nbformat",  # Indirect dependencies to be tracked. Direct dependencies are automatically tracked.
)
idCfcLn8WBSlKt
version0
time_init2022-07-18 13:04
time_run2023-04-26 14:24
parentz14KWQKD4bwE jhvyoIrxoeSz
pypackage_storenbformat==5.4.0 nbproject==0.1.6 pandas==1.4.2
pypackage_livenbformat==5.8.0 nbproject==0.8.6 pandas==2.0.1

Use the following convenience function to update packages.

meta.store.add_pypackages(["numpy", "pytest"]).write()

Update parent or any custom metadata field via:

meta.store.parent = [
    "z14KWQKD4bwE",
    "jhvyoIrxoeSz",
    "3m2Q6UBuwgSH",
]

Don’t forget to write the changes from the store to the file!

meta.store.write()