SDK for Python Cloud Shell Quick Start
This section discusses how to quickly get started with the Oracle Cloud Infrastructure SDK for Python using Cloud Shell.
- Sign in to the Console.
- Click the Cloud Shell icon in the Console header. Note that Cloud Shell runs commands against the region selected in the Console's Region selection menu when Cloud Shell was started.
- Run Python:
user@cloudshell:oci (us-phoenix-1)$ python3 Python 3.6.8 (default, Oct 1 2020, 20:32:44) [GCC 4.8.5 20150623 (Red Hat 4.8.5-44.0.3)] on linux Type "help", "copyright", "credits" or "license" for more information. >>>
-
Run the following code sample to see the current Object Storage namespace:
import oci object_storage_client = oci.object_storage.ObjectStorageClient(oci.config.from_file()) result = object_storage_client.get_namespace() print("Current object storage namespace: {}".format(result.data))
This returns output similar to the following:Current object storage namespace: mynamespace