add_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 the package can be built, run python -m build in the directory containing the package's source.
See adding packages for more information.
Parameters
mb.add_package(path=, ...)
path:strthe filepath to the.whlor a directory containing the package'ssetup.pyorpyproject.toml.force:Optional[bool]set toTrueto overwrite existing packages with the same version number in Modelbit. Default isFalse.branch:Optional[str]the branch where the package will be stored. By default the current branch is used.
Examples
Build and upload a local Python package
After building a package locally into a wheel, add it to the private packages in Modelbit:
mb.add_package("path/to/my/package.whl")
Overwrite the version in Modelbit
If the package name and version already exists in Modelbit, overwrite it with force=True:
mb.add_package("path/to/my/package.whl", force=True)