Acquire.ObjectStore._oci_objstore module¶
-
class
OCI_ObjectStore[source]¶ Bases:
objectThis is the backend that abstracts using the Oracle Cloud Infrastructure object store
-
static
clear_all_except(bucket, keys)[source]¶ Removes all objects from the passed ‘bucket’ except those whose keys are or start with any key in ‘keys’
-
static
create_bucket(bucket, bucket_name, compartment=None)[source]¶ Create and return a new bucket in the object store called ‘bucket_name’, optionally placing it into the compartment identified by ‘compartment’. This will raise an ObjectStoreError if this bucket already exists
-
static
create_par(bucket, encrypt_key, key=None, readable=True, writeable=False, duration=3600)[source]¶ Create a pre-authenticated request for the passed bucket and key (if key is None then the request is for the entire bucket). This will return a PAR object that will contain a URL that can be used to access the object/bucket. If writeable is true, then the URL will also allow the object/bucket to be written to. PARs are time-limited. Set the lifetime in seconds by passing in ‘duration’ (by default this is one hour)
-
static
get_all_object_names(bucket, prefix=None)[source]¶ Returns the names of all objects in the passed bucket
-
static
get_all_objects_from_json(bucket, prefix=None)[source]¶ Return all of the json objects in the passed bucket as json-deserialised objects
-
static
get_bucket(bucket, bucket_name, compartment=None, create_if_needed=True)[source]¶ Find and return a new bucket in the object store called ‘bucket_name’, optionally placing it into the compartment identified by ‘compartment’. If ‘create_if_needed’ is True then the bucket will be created if it doesn’t exist. Otherwise, if the bucket does not exist then an exception will be raised.
-
static
get_object(bucket, key)[source]¶ Return the binary data contained in the key ‘key’ in the passed bucket
-
static
get_object_as_file(bucket, key, filename)[source]¶ Get the object contained in the key ‘key’ in the passed ‘bucket’ and writing this to the file called ‘filename’
-
static
get_object_from_json(bucket, key)[source]¶ Return an object constructed from json stored at ‘key’ in the passed bucket. This returns None if there is no data at this key
-
static
set_object_from_file(bucket, key, filename)[source]¶ Set the value of ‘key’ in ‘bucket’ to equal the contents of the file located by ‘filename’
-
static