Skip to main content

Extra files for one deployment

If your deployment depends on one or two helper files you can include them in your deployment with the extra_files parameter.

For example, if you use import utils to access the code within a, you can include the file when you run mb.deploy:

import utils # stored at ./

def my_function(...):
return utils.example()

mb.deploy(my_function, extra_files=[""])

If is in a different directory but is still importable as import utils, then remap the filepath when deploying:

mb.deploy(my_function, extra_files={ "path/to/": "" })

For more information on using extra_files, see the API reference for extra_files.

When multiple deployments need these files‚Äč

Instead of using extra_files for code that'll be shared between deployments, use common files. Common files are files made available to all deployments.