mb.add_package(path_to_package, ...)
Stores a package in Modelbit's package repository for installation into deployment environments. Packages can be .whl
files or point to the directory of package's source.
If adding a directory this command will attempt to build the package into a .whl
. To make sure your package can be built, run python -m build
in the directory containing your package's source.
See adding packages for more information.
Parameters
path_to_package
:str
the filepath to the.whl
or a 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.whl")
Overwrite the version in Modelbit
mb.add_package("path/to/my/package.whl", force=True)