mb.add_package(path_to_package, ...)
Builds a package of Python files to be installed with new deployments. See adding packages for more information.
This is most useful when you have a directory of .py
files that can be built into a package. Typically that means there is a setup.py
and a version
associated with the files in this directory.
Parameters
path_to_package
:str
the filepath to the directory containing the package'ssetup.py
orpyproject.toml
.force
:Optional[bool]
set toTrue
to overwrite existing packages with the same version number in Modelbit. Default isFalse
.
Examples
Build and upload a local Python package
mb.add_package("path/to/my/package")
Overwrite the version in Modelbit
mb.add_package("path/to/my/package", force=True)