Package arvados :: Module collection :: Class CollectionReader
[hide private]
[frames] | no frames]

Class CollectionReader

source code

builtins.object --+            
                  |            
     CollectionBase --+        
                      |        
     RichCollectionBase --+    
                          |    
                 Collection --+
                              |
                             CollectionReader

A read-only collection object.

Initialize from a collection UUID or portable data hash, or raw manifest text. See `Collection` constructor for detailed options.

Instance Methods [hide private]
 
__init__(self, manifest_locator_or_text, *args, **kwargs)
Collection constructor.
source code
 
writable(self) source code
 
_populate_streams(orig_func) source code
 
normalize(self)
Normalize the streams returned by `all_streams`.
source code
 
all_streams(self) source code
 
all_files(self) source code

Inherited from Collection: __enter__, __exit__, api_response, clone, find, find_or_create, get_properties, get_trash_at, known_past_version, manifest_locator, notify, remove, root_collection, save, save_new, stop_threads, stream_name, update

Inherited from RichCollectionBase: __contains__, __delitem__, __eq__, __getitem__, __iter__, __len__, __ne__, add, apply, committed, copy, diff, exists, flush, items, keys, manifest_text, mkdirs, modified, open, portable_data_hash, portable_manifest_text, rename, set_committed, subscribe, unsubscribe, values

Inherited from CollectionBase: stripped_manifest

Class Variables [hide private]

Inherited from Collection (private): _block_re, _segment_re, _token_re

Method Details [hide private]

__init__(self, manifest_locator_or_text, *args, **kwargs)
(Constructor)

source code 
Collection constructor.

:manifest_locator_or_text:
  An Arvados collection UUID, portable data hash, raw manifest
  text, or (if creating an empty collection) None.

:parent:
  the parent Collection, may be None.

:apiconfig:
  A dict containing keys for ARVADOS_API_HOST and ARVADOS_API_TOKEN.
  Prefer this over supplying your own api_client and keep_client (except in testing).
  Will use default config settings if not specified.

:api_client:
  The API client object to use for requests.  If not specified, create one using `apiconfig`.

:keep_client:
  the Keep client to use for requests.  If not specified, create one using `apiconfig`.

:num_retries:
  the number of retries for API and Keep requests.

:block_manager:
  the block manager to use.  If not specified, create one.

:replication_desired:
  How many copies should Arvados maintain. If None, API server default
  configuration applies. If not None, this value will also be used
  for determining the number of block copies being written.

Overrides: RichCollectionBase.__init__

writable(self)

source code 
Overrides: RichCollectionBase.writable

normalize(self)

source code 

Normalize the streams returned by `all_streams`.

This method is kept for backwards compatability and only affects the behavior of `all_streams()` and `all_files()`

Decorators:
  • @_populate_streams

all_streams(self)

source code 
Decorators:
  • @_populate_streams

all_files(self)

source code 
Decorators:
  • @_populate_streams