Warning
This document is for an old release 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.files package¶
- class galaxy.files.FileSourcePath(file_source, path)¶
Bases:
tuple
- property file_source¶
Alias for field number 0
- property path¶
Alias for field number 1
- class galaxy.files.ConfiguredFileSources(file_sources_config: ConfiguredFileSourcesConfig, conf_file=None, conf_dict=None, load_stock_plugins=False)[source]¶
Bases:
object
Load plugins and resolve Galaxy URIs to FileSource objects.
- __init__(file_sources_config: ConfiguredFileSourcesConfig, conf_file=None, conf_dict=None, load_stock_plugins=False)[source]¶
- get_file_source_path(uri)[source]¶
Parse uri into a FileSource object and a path relative to its base.
- plugins_to_dict(for_serialization: bool = False, user_context: Optional[FileSourceDictifiable] = None) List[Dict[str, Any]] [source]¶
- class galaxy.files.NullConfiguredFileSources[source]¶
Bases:
ConfiguredFileSources
- class galaxy.files.ConfiguredFileSourcesConfig(symlink_allowlist=None, fetch_url_allowlist=None, library_import_dir=None, user_library_import_dir=None, ftp_upload_dir=None, ftp_upload_purge=True)[source]¶
Bases:
object
- class galaxy.files.FileSourceDictifiable[source]¶
Bases:
Dictifiable
- dict_collection_visible_keys = ('email', 'username', 'ftp_dir', 'preferences', 'is_admin')¶
- class galaxy.files.ProvidesUserFileSourcesUserContext(trans)[source]¶
Bases:
FileSourceDictifiable
Implement a FileSourcesUserContext from a Galaxy ProvidesUserContext (e.g. trans).
- property email¶
- property username¶
- property ftp_dir¶
- property preferences¶
- property is_admin¶
Whether this user is an administrator.
- property user_vault¶
User vault namespace
- property app_vault¶
App vault namespace
- class galaxy.files.DictFileSourcesUserContext(**kwd)[source]¶
Bases:
FileSourceDictifiable
- property email¶
- property username¶
- property ftp_dir¶
- property preferences¶
- property role_names¶
- property group_names¶
- property is_admin¶
- property user_vault¶
- property app_vault¶
Subpackages¶
- galaxy.files.sources package
FilesSource
BaseFilesSource
BaseFilesSource.plugin_type
BaseFilesSource.get_prefix()
BaseFilesSource.get_scheme()
BaseFilesSource.get_writable()
BaseFilesSource.user_has_access()
BaseFilesSource.user_context_required
BaseFilesSource.get_uri_root()
BaseFilesSource.uri_from_path()
BaseFilesSource.to_dict()
BaseFilesSource.to_dict_time()
BaseFilesSource.list()
BaseFilesSource.write_from()
BaseFilesSource.realize_to()
uri_join()
slash_join()
- Submodules
- galaxy.files.sources.anvil module
- galaxy.files.sources.basespace module
- galaxy.files.sources.dropbox module
- galaxy.files.sources.ftp module
- galaxy.files.sources.galaxy module
- galaxy.files.sources.googlecloudstorage module
- galaxy.files.sources.googledrive module
- galaxy.files.sources.onedata module
- galaxy.files.sources.posix module
- galaxy.files.sources.s3 module
- galaxy.files.sources.s3fs module
- galaxy.files.sources.ssh module
- galaxy.files.sources.webdav module
- galaxy.files.unittest_utils package
Submodules¶
galaxy.files.uris module¶
- galaxy.files.uris.stream_url_to_str(path: str, file_sources: Optional[ConfiguredFileSources] = None, prefix: str = 'gx_file_stream') str [source]¶
- galaxy.files.uris.stream_url_to_file(path: str, file_sources: Optional[ConfiguredFileSources] = None, prefix: str = 'gx_file_stream', dir: Optional[str] = None, user_context=None) str [source]¶
- galaxy.files.uris.stream_to_file(stream, suffix='', prefix='', dir=None, text=False, **kwd)[source]¶
Writes a stream to a temporary file, returns the temporary file’s name
- galaxy.files.uris.validate_uri_access(uri: str, is_admin: bool, ip_allowlist: List[Union[IPv4Address, IPv6Address, IPv4Network, IPv6Network]]) None [source]¶
Perform uniform checks on supplied URIs.
Prevent access to local IPs not found in ip_allowlist.
Don’t allow non-admins to access file:// URIs.
- galaxy.files.uris.validate_non_local(uri: str, ip_allowlist: List[Union[IPv4Address, IPv6Address, IPv4Network, IPv6Network]]) str [source]¶