mirror of
https://github.com/oceanprotocol/docs.git
synced 2024-11-26 19:49:26 +01:00
GITBOOK-422: change request with no subject merged in GitBook
This commit is contained in:
parent
9922c63d85
commit
32b0d6306a
16
.gitbook/assets/file.excalidraw.svg
Normal file
16
.gitbook/assets/file.excalidraw.svg
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 558.2830840223749 23.380556316496808" width="558.2830840223749" height="23.380556316496808">
|
||||||
|
<!-- svg-source:excalidraw -->
|
||||||
|
<!-- payload-type:application/vnd.excalidraw+json --><!-- payload-version:2 --><!-- payload-start -->eyJ2ZXJzaW9uIjoiMSIsImVuY29kaW5nIjoiYnN0cmluZyIsImNvbXByZXNzZWQiOnRydWUsImVuY29kZWQiOiJ4nHVTy26jMFx1MDAxNN3zXHUwMDE1iG47Kc80dDd9SO1oNKqURVx1MDAxN1VcdTAwMTdcdTAwMGV2wMLYlm1CM1X+fWxDbcqkXlx1MDAwMPfcc1x1MDAxZtxz/Vx1MDAxMYRhpI5cdTAwMWNFN2GE3itAMFx1MDAxNGCILlxyfkBCYka1K7W2ZL2oLLNRisubqyvA+arGasdYu6pYN4YhgjpEldTEV22H4Yd9zlxuXHUwMDExTJHlWtSXScpkif5h1JZMsjwr13mWb1x1MDAxY1x1MDAwM8t7XUohqN17QCTyXHUwMDFlXHUwMDAzRcPvX2DbJYdcdTAwMWa7uipcdTAwMWXjh/v25bn0ZfeYkK06kvGHQNX0YtaUVIK16Fx1MDAwNUPVmOpcdTAwMGLcxUmmXHUwMDA35qNcdTAwMDTr64ZcIim/xDBcdTAwMGUqrI5cdTAwMDaLY4dcdTAwMDJa21x1MDAxY1x1MDAxZXnXVp5mzrZcdTAwMTHZZlx1MDAxNc9Ptmjljlx1MDAxMSZMK1x1MDAxN6PfN7NcdTAwMDNVW+uOKHRcdTAwMWMlXHUwMDAwlVx1MDAxY1xiLY/nXHLTT1x1MDAxNtm1w1x1MDAxYYTrRn0qP5ZDdtJ5ml8nRZHmzmFq8Cdo9X6bj4LCaVx1MDAxNJ9cdTAwMGLgVyCdkJPv1vBcdTAwMWZmq+NT9Vx1MDAxY4JR5mS9WcfFOs7KtCydX69Tq520J8RjrGrPbIZUQKhbTCGm9TJcdTAwMDRR+I2HXHUwMDAwqe5Y12Gl23hmmKolw+b9KVx1MDAwNFx1MDAxYlx1MDAxYVx1MDAwNOCZzN/6uEnn74o5/iv022Fccvf9dnmWPZPQnNTzg/n7XHUwMDE0TFx1MDAxOVwifYG3Slx1MDAwZteJpNXEcIv/oi99Rlx1MDAwN4yG2//36WJvT1x1MDAxNExKmkuFrOKn4PRcdTAwMGZK/Vx1MDAxN2wifQ==<!-- payload-end -->
|
||||||
|
<defs>
|
||||||
|
<style class="style-fonts">
|
||||||
|
@font-face {
|
||||||
|
font-family: "Virgil";
|
||||||
|
src: url("https://unpkg.com/@excalidraw/excalidraw@0.14.2/dist/excalidraw-assets/Virgil.woff2");
|
||||||
|
}
|
||||||
|
@font-face {
|
||||||
|
font-family: "Cascadia";
|
||||||
|
src: url("https://unpkg.com/@excalidraw/excalidraw@0.14.2/dist/excalidraw-assets/Cascadia.woff2");
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</defs>
|
||||||
|
<rect x="0" y="0" width="558.2830840223749" height="23.380556316496808" fill="#ffffff"/><g stroke-linecap="round"><g transform="translate(10.321380500495422 10.676766553344208) rotate(0 268.5 1)"><path d="M-0.32 0.24 C88.9 0.5, 446.19 2.44, 535.85 2.7 M1.71 -0.68 C91.23 -0.25, 448.71 0.33, 537.96 0.95" stroke="#000000" stroke-width="1" fill="none"/></g></g><mask/></svg>
|
After Width: | Height: | Size: 2.1 KiB |
@ -8,15 +8,29 @@ At the beginning of most flows, we create an `ocean` object, which is an instanc
|
|||||||
|
|
||||||
### Ocean Instance
|
### Ocean Instance
|
||||||
|
|
||||||
Ocean class:
|
#### constructor
|
||||||
|
|
||||||
<details>
|
* **\_\_init\_\_**(`self`, `config_dict: Dict`, `data_provider: Optional[Type] = None`)
|
||||||
|
|
||||||
<summary><a href="https://github.com/oceanprotocol/ocean.py/blob/main/ocean_lib/ocean/ocean.py#L43"><code>Ocean</code> - The Ocean class is the entry point into Ocean Protocol.</a></summary>
|
The Ocean class is the entry point into Ocean Procol.
|
||||||
|
|
||||||
In order to initialize a Ocean object, you must provide `config_dict` which is a `Dictionary` instance and optionally a `DataServiceProvider` instance.
|
In order to initialize a Ocean object, you must provide `config_dict` which is a `Dictionary` instance and optionally a `DataServiceProvider` instance.
|
||||||
|
|
||||||
[Here ](https://github.com/oceanprotocol/ocean.py/blob/main/ocean\_lib/ocean/ocean.py#LL43C1-L96C53)is the source code.
|
**Parameters**
|
||||||
|
|
||||||
|
<table><thead><tr><th width="182">Name</th><th width="260">Type</th><th width="162">Default Value</th><th>Description</th></tr></thead><tbody><tr><td><code>config_dict</code></td><td><code>dict</code></td><td>mandatory</td><td>It contains the configuration as dictionary format.</td></tr><tr><td><code>data_provider</code></td><td><code>Optional[DataProvider]</code></td><td>None</td><td>It is an optional parameter for DataProvider instance, if it is not provided, the constructor will instantiate a fresh one.</td></tr></tbody></table>
|
||||||
|
|
||||||
|
**Returns**
|
||||||
|
|
||||||
|
`Ocean` instance
|
||||||
|
|
||||||
|
**Defined in**
|
||||||
|
|
||||||
|
[ocean/ocean.py](https://github.com/oceanprotocol/ocean.py/blob/main/ocean\_lib/ocean/ocean.py#L43)
|
||||||
|
|
||||||
|
<details>
|
||||||
|
|
||||||
|
<summary>Source code</summary>
|
||||||
|
|
||||||
{% code overflow="wrap" %}
|
{% code overflow="wrap" %}
|
||||||
```python
|
```python
|
||||||
@ -79,17 +93,29 @@ class Ocean:
|
|||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
Config dict attribute:
|
#### config getter
|
||||||
|
|
||||||
<details>
|
**config**(`self`) -> `dict`
|
||||||
|
|
||||||
<summary><a href="https://github.com/oceanprotocol/ocean.py/blob/main/ocean_lib/ocean/ocean.py#LL265C1-L268C32"><code>ocean.config_dict</code> or <code>ocean.config -> dict</code></a></summary>
|
|
||||||
|
|
||||||
It is a helper method for retrieving the user's configuration for ocean.py.\
|
It is a helper method for retrieving the user's configuration for ocean.py.\
|
||||||
It can be called only by Ocean object and returns a python dictionary.
|
It can be called only by Ocean object and returns a python dictionary.
|
||||||
|
|
||||||
|
**Returns**
|
||||||
|
|
||||||
|
`dict`
|
||||||
|
|
||||||
|
Configuration fields as dictionary.
|
||||||
|
|
||||||
|
**Defined in**
|
||||||
|
|
||||||
|
[ocean/ocean.py](https://github.com/oceanprotocol/ocean.py/blob/main/ocean\_lib/ocean/ocean.py#LL265C1-L268C32)
|
||||||
|
|
||||||
|
<details>
|
||||||
|
|
||||||
|
<summary>Source code</summary>
|
||||||
|
|
||||||
```python
|
```python
|
||||||
@property
|
@property
|
||||||
@enforce_types
|
@enforce_types
|
||||||
def config(self) -> dict: # alias for config_dict
|
def config(self) -> dict: # alias for config_dict
|
||||||
return self.config_dict
|
return self.config_dict
|
||||||
|
Loading…
Reference in New Issue
Block a user