New#

Description#

Takes package name and version, and creates a new .<package>.wrapp file.

The new command does not operate on any files or packages, it rather is a shortcut to create a suitable .<package>.wrapp file to be used by subsequent install-commands.

For instance, when creating a new scenario and wanting to capture the asset packages used, it is useful to have a wrapp file that will record the dependencies installed.

.wrapp files are JSON files, be aware though that the file structure might change with new WRAPP versions.

For CLI options, run wrapp new --help.

Python API Reference#

async wrapp.new(
package_name: str,
version: str,
destination: str,
create_catalog: bool,
tags: bool = False,
ignores: str | IgnoreEvaluator | None = None,
local_hash: bool = False,
*,
context: CommandParameters = CommandParameters(debug=False, verbose=False, dry_run=False, log_file=None, hash_cache_file=None),
scheduler: SchedulerContext | None = None,
) None#

Takes package name and version, and creates a new .<package>.wrapp file

This creates a new .<package>.wrapp package file that can be used as a target for the install-command to record dependencies. Name and version are just strings, destination needs to be a URL pointing to a folder.

Parameters:
  • package_name – Name of the package

  • version – Initial version. Can be overridden by the first create command for this package

  • destination – URL of the package. In this directory the new .wrapp file will be created.

  • create_catalog – Specify whether to catalog the location and put the catalog into the wrapp file created.

  • tags – Specify this to also catalog the tags when cataloging the destination

  • ignores – Specify a name of an ignore rule file to use during cataloging

  • local_hash – Set this to allow calculating local hashes during cataloging. Might download data when creating in a remote server.

  • context – Global configuration parameters

  • scheduler – Optionally pre-constructed SchedulerContext. When calling many functions in a row make sure to pre-construct the scheduler.

Raises:
  • FailedCommand – When prerequisites not matched

  • StorageOperationError – Raised when network or file operations fail