|
2 | 2 | "cells": [ |
3 | 3 | { |
4 | 4 | "cell_type": "markdown", |
5 | | - "id": "909f1aef", |
6 | 5 | "metadata": {}, |
7 | 6 | "source": [ |
8 | | - "Copyright (c) 2021, 2022 Oracle and/or its affiliates.\n", |
9 | | - "Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/" |
10 | | - ] |
11 | | - }, |
12 | | - { |
13 | | - "cell_type": "markdown", |
14 | | - "metadata": {}, |
15 | | - "source": [ |
16 | | - "## Getting Started with ocifs\n", |
| 7 | + "## Getting Started\n", |
17 | 8 | "\n", |
18 | 9 | "The Oracle Cloud Infrastructure (OCI) Object Storage filesystem (ocifs) is an fsspec implementation for use with Object Storage." |
19 | 10 | ] |
|
95 | 86 | "The `storage_options` parameter contains a dictionary of arguments that are passed to the underlying `OCIFileSystem` method. The following `docstring` lists the valid arguments to storage options:" |
96 | 87 | ] |
97 | 88 | }, |
98 | | - { |
99 | | - "cell_type": "code", |
100 | | - "execution_count": 5, |
101 | | - "metadata": {}, |
102 | | - "outputs": [ |
103 | | - { |
104 | | - "data": { |
105 | | - "text/plain": [ |
106 | | - "\u001b[0;31mInit signature:\u001b[0m \u001b[0mocifs\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mOCIFileSystem\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", |
107 | | - "\u001b[0;31mDocstring:\u001b[0m \n", |
108 | | - "Access oci as if it were a file system.\n", |
109 | | - "This exposes a filesystem-like API (ls, cp, open, etc.) on top of oci\n", |
110 | | - "storage.\n", |
111 | | - "Parameters\n", |
112 | | - "----------\n", |
113 | | - "config : Union[dict, str, None]\n", |
114 | | - " Config for the connection to OCI. \n", |
115 | | - " If a dict, it should be returned from oci.config.from_file\n", |
116 | | - " If a str, it should be the location of the config file\n", |
117 | | - " If None, user should have a Resource Principal configured environment\n", |
118 | | - "profile : str\n", |
119 | | - " The profile to use from the config (If the config is passed in)\n", |
120 | | - "default_block_size: int (None)\n", |
121 | | - " If given, the default block size value used for ``open()``, if no\n", |
122 | | - " specific value is given at all time. The built-in default is 5MB.\n", |
123 | | - "config_kwargs : dict of parameters passed to the OCI Client upon connection\n", |
124 | | - " This will first scan for `profile` (in the case of a passed in config)\n", |
125 | | - " Or `resource_principal_token_path_provider` (in the case of no config)\n", |
126 | | - " The rest will be passed to the ObjectStorageClient\n", |
127 | | - " more info here: oci.object_storage.ObjectStorageClient.__init__\n", |
128 | | - "oci_additional_kwargs : dict of parameters that are used when calling oci api\n", |
129 | | - " methods. Typically used for things like \"retry_strategy\" or .\n", |
130 | | - "kwargs : other parameters for oci session\n", |
131 | | - " This includes default parameters for tenancy, namespace, and region\n", |
132 | | - " Any other parameters are passed along to AbstractFileSystem's init method.\n", |
133 | | - "Examples\n", |
134 | | - "--------\n", |
135 | | - ">>> fs = OCIFileSystem(config=config) # doctest: +SKIP\n", |
136 | | - ">>> fs.ls('my-bucket@my-namespace/') # doctest: +SKIP\n", |
137 | | - "['my-file.txt']\n", |
138 | | - ">>> with fs.open('my-bucket@my-namespace/my-file.txt', mode='rb') as f: # doctest: +SKIP\n", |
139 | | - "... print(f.read()) # doctest: +SKIP\n", |
140 | | - "b'Hello, world!'\n", |
141 | | - "\u001b[0;31mInit docstring:\u001b[0m\n", |
142 | | - "Create and configure file-system instance\n", |
143 | | - "\n", |
144 | | - "Instances may be cachable, so if similar enough arguments are seen\n", |
145 | | - "a new instance is not required. The token attribute exists to allow\n", |
146 | | - "implementations to cache instances if they wish.\n", |
147 | | - "\n", |
148 | | - "A reasonable default should be provided if there are no arguments.\n", |
149 | | - "\n", |
150 | | - "Subclasses should call this method.\n", |
151 | | - "\n", |
152 | | - "Parameters\n", |
153 | | - "----------\n", |
154 | | - "use_listings_cache, listings_expiry_time, max_paths:\n", |
155 | | - " passed to ``DirCache``, if the implementation supports\n", |
156 | | - " directory listing caching. Pass use_listings_cache=False\n", |
157 | | - " to disable such caching.\n", |
158 | | - "skip_instance_cache: bool\n", |
159 | | - " If this is a cachable implementation, pass True here to force\n", |
160 | | - " creating a new instance even if a matching instance exists, and prevent\n", |
161 | | - " storing this instance.\n", |
162 | | - "asynchronous: bool\n", |
163 | | - "loop: asyncio-compatible IOLoop or None\n", |
164 | | - "\u001b[0;31mFile:\u001b[0m ~/ocifs/ocifs/core.py\n", |
165 | | - "\u001b[0;31mType:\u001b[0m _Cached\n", |
166 | | - "\u001b[0;31mSubclasses:\u001b[0m \n" |
167 | | - ] |
168 | | - }, |
169 | | - "metadata": {}, |
170 | | - "output_type": "display_data" |
171 | | - } |
172 | | - ], |
173 | | - "source": [ |
174 | | - "ocifs.OCIFileSystem?" |
175 | | - ] |
176 | | - }, |
177 | 89 | { |
178 | 90 | "cell_type": "markdown", |
179 | 91 | "metadata": {}, |
|
0 commit comments