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 and a version associated with the files in this directory.


  • path_to_package: str the filepath to the directory containing the package's or pyproject.toml.
  • force: Optional[bool] set to True to overwrite existing packages with the same version number in Modelbit. Default is False.


Build and upload a local Python package


Overwrite the version in Modelbit

mb.add_package("path/to/my/package", force=True)

See also