The Object Class

The Object class inherits from Resource.

class openstack.object_store.v1.obj.Object(data=None, **attrs)

The base resource

  • _synchronized (bool) – This is not intended to be used directly. See new() and existing().

  • connection (openstack.connection.Connection) – Reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.


The unique name for the container.


The unique name for the object.


If set to True, Object Storage queries all replicas to return the most recent one. If you omit this header, Object Storage responds faster after it finds one valid replica. Because setting this header to True is more expensive for the back end, use it only when it is absolutely needed. Type: bool


TODO(briancurtin) there’s a lot of content here…




In combination with Expect: 100-Continue, specify an “If-None-Match: *” header to query whether the server already has a copy of the object before any data is sent.






Used with temporary URLs to sign the request. For more information about temporary URLs, see OpenStack Object Storage API v1 Reference.


Used with temporary URLs to specify the expiry time of the signature. For more information about temporary URLs, see OpenStack Object Storage API v1 Reference.


If you include the multipart-manifest=get query parameter and the object is a large object, the object contents are not returned. Instead, the manifest is returned in the X-Object-Manifest response header for dynamic large objects or in the response body for static large objects.


HEAD operations do not return content. However, in this operation the value in the Content-Length header is not the size of the response body. Instead it contains the size of the object, in bytes.


The MIME type of the object.


The type of ranges that the object accepts.


For objects smaller than 5 GB, this value is the MD5 checksum of the object content. The value is not quoted. For manifest objects, this value is the MD5 checksum of the concatenated string of MD5 checksums and ETags for each of the segments in the manifest, and not the MD5 checksum of the content that was downloaded. Also the value is enclosed in double-quote characters. You are strongly recommended to compute the MD5 checksum of the response body as it is received and compare this value with the one in the ETag header. If they differ, the content was corrupted, so retry the operation.


Set to True if this object is a static large object manifest object. Type: bool


If set, the value of the Content-Encoding metadata. If not set, this header is not returned by this operation.


If set, specifies the override behavior for the browser. For example, this header might specify that the browser use a download program to save this file rather than show the file, which is the default. If not set, this header is not returned by this operation.


Specifies the number of seconds after which the object is removed. Internally, the Object Storage system stores this value in the X-Delete-At metadata item.


If set, the time when the object will be deleted by the system in the format of a UNIX Epoch timestamp. If not set, this header is not returned by this operation.


If set, to this is a dynamic large object manifest object. The value is the container and object name prefix of the segment objects in the form container/prefix.


The timestamp of the transaction.


The date and time that the object was created or the last time that the metadata was changed.


Set to chunked to enable chunked transfer encoding. If used, do not set the Content-Length header to a non-zero value.


If set to true, Object Storage guesses the content type based on the file extension and ignores the value sent in the Content-Type header, if present. Type: bool


If set, this is the name of an object used to create the new object by copying the X-Copy-From object. The value is in form {container}/{object}. You must UTF-8-encode and then URL-encode the names of the container and object before you include them in the header. Using PUT with X-Copy-From has the same effect as using the COPY operation to copy an object.

create(session, base_path=None)

Create a remote resource based on this instance.

  • session (Adapter) – The session to use for making this request.

  • prepend_key – A boolean indicating whether the resource_key should be prepended in a resource creation request. Default to True.

  • base_path (str) – Base part of the URI for creating resources, if different from base_path.

  • params (dict) – Additional params to pass.


This Resource instance.


MethodNotSupported if Resource.allow_create is not set to True.