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_run2024-05-20 09:46
parentz14KWQKD4bwE jhvyoIrxoeSz
pypackage_storenbformat==5.4.0 nbproject==0.1.6 pandas==1.4.2
pypackage_livenbformat==5.10.4 nbproject==0.10.3 pandas==2.2.2

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()