Skip to main content

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's setup.py or pyproject.toml.
  • force: Optional[bool] set to True to overwrite existing packages with the same version number in Modelbit. Default is False.

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)

See also