Skip to main content
Package code for deployment to Anaconda Platform. This is a composable building block that can be used standalone or combined with AppDeployer to deploy apps with custom code packages. Parameters:
string[]
required
Directories to include in the package. All paths must exist and be directories.
string[]
File extensions to include, such as [".py", ".json", ".yaml"]. If not set, uses the default suffixes: .py, .txt, .yaml, .yml, .json, .html, .css, .js, .jsx, .ts, .tsx, .md, .rst.
function
Logger function for progress messages. Receives a single string argument.
Returns:
PackagedCode
A named tuple containing url (the package URL in object storage) and key (the unique content-addressed key identifying this package).
Raises:
  • CodePackagingException: If packaging fails or if invalid paths are provided.
Examples: Package a directory:
Package multiple directories:
Package with specific file types: