Import#
Description#
Given a previously exported tar file and a repository location, import the package and make it available for install commands using that repository.
An exported package can be imported again into a repository. This is typically used after creating a tar file
with the export command. Supported archive formats are .tar and .tar.gz.
If an archive contains SimReady package-standard sidecars, import writes them
next to the imported .wrapp file verbatim, preserving package-standard
identity; it does not regenerate, re-hash, or validate them. The archive is
trusted the same way its .wrapp catalog and content hashes are trusted, so
whatever sidecars the archive carries are imported as-is. See
WRAPP Metadata and SimReady Package-Standard Sidecars.
For usage examples, see the Tutorial. For CLI options, run wrapp import --help.
Python API Reference#
- async wrapp.import_package(
- package_file: str,
- repository: str,
- overwrite: bool = False,
- *,
- context: CommandParameters = CommandParameters(debug=False, verbose=False, dry_run=False, log_file=None, hash_cache_file=None),
- scheduler: SchedulerContext | None = None,
Given a previously exported tar file and a repository location, import the package and make it available for install commands using that repository
- Parameters:
package_file – Name of tar file to import. Note the naming convention is that it is either <package_name>.tar or <package_name>.<version>.tar
repository – URL of the repository to write the package to (excluding the .packages directory)
overwrite – Set this to allow overwriting an existing package. Note this might leave extra files in the repository.
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