This document is for an in-development version of Galaxy. You can alternatively view this page in the latest release if it exists or view the top of the latest release's documentation.

galaxy.tools.imp_exp package

class galaxy.tools.imp_exp.JobImportHistoryArchiveWrapper(app, job_id)[source]

Bases: object

Class provides support for performing jobs that import a history from an archive.

__init__(app, job_id)[source]
setup_job(jiha, archive_source, archive_type)[source]

Set history, datasets, collections and jobs’ attributes and clean up archive directory.

class galaxy.tools.imp_exp.JobExportHistoryArchiveWrapper(app, job_id)[source]

Bases: object

Class provides support for performing jobs that export a history to an archive.

__init__(app, job_id)[source]
setup_job(history, store_directory, include_hidden=False, include_deleted=False, compressed=True, user: User | None = None)[source]

Perform setup for job to export a history into an archive.


galaxy.tools.imp_exp.export_history module

Export a history to an archive file using attribute files.

usage: %prog history_attrs dataset_attrs job_attrs out_file

-G, –gzip: gzip archive file

galaxy.tools.imp_exp.export_history.create_archive(export_directory, out_file, gzip=False)[source]

Create archive from the given attribute/metadata files and save it to out_file.

galaxy.tools.imp_exp.export_history.get_file_sources(file_sources_path: str) ConfiguredFileSources[source]

galaxy.tools.imp_exp.unpack_tar_gz_archive module

Unpack a tar, tar.gz or zip archive into a directory.

usage: %prog archive_source dest_dir

–[url|file] source type, either a URL or a file.

galaxy.tools.imp_exp.unpack_tar_gz_archive.get_file_sources(file_sources_path) ConfiguredFileSources[source]
galaxy.tools.imp_exp.unpack_tar_gz_archive.check_archive(archive_file, dest_dir)[source]

Ensure that a tar archive has no absolute paths or relative paths outside the archive.

galaxy.tools.imp_exp.unpack_tar_gz_archive.unpack_archive(archive_file, dest_dir)[source]

Unpack a tar and/or gzipped archive into a destination directory.

galaxy.tools.imp_exp.unpack_tar_gz_archive.main(options, args)[source]