You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.rst
+18Lines changed: 18 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,24 @@ All notable changes to this project will be documented in this file.
4
4
5
5
The format is based on `Keep a Changelog <http://keepachangelog.com/>`_.
6
6
7
+
====================
8
+
1.3.15 - 2018-02-22
9
+
====================
10
+
11
+
Added
12
+
-----
13
+
* Support for File Storage Service
14
+
15
+
* An example on using the File Storage Service can be found on `GitHub <https://github.com/oracle/oci-python-sdk/blob/master/examples/file_storage_example.py>`__.
16
+
17
+
* Added support for tagging Bucket resources in the Object Storage Service
18
+
19
+
* An example on tagging buckets can be found on `GitHub <https://github.com/oracle/oci-python-sdk/blob/master/examples/object_storage_bucket_tagging_example.py>`__.
20
+
21
+
* Added support for specifying a restore period for archived objects in the ``RestoreObjects`` operation of the Object Storage service.
22
+
23
+
* An example on using archive storage can be found on `GitHub <https://github.com/oracle/oci-python-sdk/blob/master/examples/object_storage_archive_example.py>`__.
The Python SDK uses the `Requests <http://docs.python-requests.org/en/master/>`_ library to make calls to OCI services. The SDK uses the Requests `definition <http://docs.python-requests.org/en/master/user/advanced/#timeouts>`_ for connection and read timeouts.
15
+
16
+
By default, calls made to OCI services have no connection or read timeout associated with them (i.e. it is possible to wait forever for a response). If you wish to override this default behaviour and set a timeout, you can do something similar to:
17
+
18
+
.. code-block:: python
19
+
20
+
import oci
21
+
22
+
config = oci.config.from_file()
23
+
compute = oci.core.ComputeClient(config)
24
+
25
+
# This will set a value of 5 seconds to the connection and read timeout
26
+
compute.base_client.timeout =5
27
+
28
+
# This will set the connection timeout to 2 seconds and the read timeout to 25 seconds
29
+
compute.base_client.timeout = (2, 25)
30
+
31
+
32
+
You can modify the ``timeout`` attribute of the ``base_client`` to customize our connection and read timeouts. This attribute takes input in the same format as `Requests <http://docs.python-requests.org/en/master/>`_ does, namely:
33
+
34
+
* A single value will be applied to both the connection and read timeouts
35
+
* If a tuple is provided then the first value is used as the connection timeout and the second as the read timeout
The Python SDK uses the `Requests <http://docs.python-requests.org/en/master/>`_ library to make calls to OCI services. If you need to add custom headers to your calls, you can do so via modifying the underlying Requests `Session <http://docs.python-requests.org/en/master/api/#request-sessions>`_ object
15
+
16
+
.. code-block:: python
17
+
18
+
import oci
19
+
20
+
config = oci.config.from_file()
21
+
compute = oci.core.ComputeClient(config)
22
+
23
+
# Adds my-custom-header as a header in the request. This header will be included in ALL
As a convenience over manually writing pagination code, you can make use of the functions in the :py:mod:`~oci.pagination` module to:
123
119
124
-
>>> for user in paginate(
125
-
... identity.list_users,
126
-
... compartment_id=compartment_id):
127
-
... print(user)
120
+
* Eagerly load all possible results from a list call
121
+
* Eagerly load all results from a list call up to a given limit
122
+
* Lazily load results (either all results, or up to a given limit) from a list call via a generator. These generators can yield either values/models or the raw response from calling the list operation
128
123
129
-
This ``paginate`` function will work for any list call, but will not include the response metadata, such as headers,
130
-
HTTP status code, or request id.
124
+
For examples on pagination, please check `GitHub <https://github.com/oracle/oci-python-sdk/blob/master/examples/pagination.py>`__.
131
125
132
126
133
127
-------------------
@@ -216,7 +210,7 @@ And to get it back:
216
210
============
217
211
218
212
Next, head to the `User Guides`_ or jump right into the :ref:`API Reference <api-reference>`
219
-
to explore the available operations for each service, and their parameters. Additional Python examples can be found on `GitHub <https://github.com/oracle/oci-python-sdk/tree/master/examples>`_.
213
+
to explore the available operations for each service, and their parameters. Additional Python examples can be found on `GitHub <https://github.com/oracle/oci-python-sdk/tree/master/examples>`__.
0 commit comments