From 32b0d6306a9d19c08214773c3bb127d957645d1f Mon Sep 17 00:00:00 2001 From: "mariacarmina.cretu" Date: Tue, 6 Jun 2023 13:29:23 +0000 Subject: [PATCH] GITBOOK-422: change request with no subject merged in GitBook --- .gitbook/assets/file.excalidraw.svg | 16 +++++++++ developers/ocean.py/technical-details.md | 44 +++++++++++++++++++----- 2 files changed, 51 insertions(+), 9 deletions(-) create mode 100644 .gitbook/assets/file.excalidraw.svg diff --git a/.gitbook/assets/file.excalidraw.svg b/.gitbook/assets/file.excalidraw.svg new file mode 100644 index 00000000..e061aa71 --- /dev/null +++ b/.gitbook/assets/file.excalidraw.svg @@ -0,0 +1,16 @@ + + + eyJ2ZXJzaW9uIjoiMSIsImVuY29kaW5nIjoiYnN0cmluZyIsImNvbXByZXNzZWQiOnRydWUsImVuY29kZWQiOiJ4nHVTy26jMFx1MDAxNN3zXHUwMDE1iG47Kc80dDd9SO1oNKqURVx1MDAxN1VcdTAwMTdcdTAwMGV2wMLYlm1CM1X+fWxDbcqkXlx1MDAwMPfcc1x1MDAxZtxz/Vx1MDAxMYRhpI5cdTAwMWNFN2GE3itAMFx1MDAxNGCILlxyfkBCYka1K7W2ZL2oLLNRisubqyvA+arGasdYu6pYN4YhgjpEldTEV22H4Yd9zlxuXHUwMDExTJHlWtSXScpkif5h1JZMsjwr13mWb1x1MDAxY1x1MDAwM8t7XUohqN17QCTyXHUwMDFlXHUwMDAzRcPvX2DbJYdcdTAwMWa7uipcdTAwMWXjh/v25bn0ZfeYkK06kvGHQNX0YtaUVIK16Fx1MDAwNUPVmOpcdTAwMGLcxUmmXHUwMDA35qNcdTAwMDTr64ZcIim/xDBcdTAwMGUqrI5cdTAwMDaLY4dcdTAwMDJa21x1MDAxY1x1MDAxZXnXVp5mzrZcdTAwMTHZZlx1MDAxNc9Ptmjljlx1MDAxMSZMK1x1MDAxN6PfN7NcdTAwMDNVW+uOKHRcdTAwMWMlXHUwMDAwlVx1MDAxY1xiLY/nXHLTT1x1MDAxNtm1w1x1MDAxYYTrRn0qP5ZDdtJ5ml8nRZHmzmFq8Cdo9X6bj4LCaVx1MDAxNJ9cdTAwMGLgVyCdkJPv1vBcdTAwMWZmq+NT9Vx1MDAxY4JR5mS9WcfFOs7KtCydX69Tq520J8RjrGrPbIZUQKhbTCGm9TJcdTAwMDRR+I2HXHUwMDAwqe5Y12Gl23hmmKolw+b9KVx1MDAwNFx1MDAxYlx1MDAxYVx1MDAwNOCZzN/6uEnn74o5/iv022Fccvf9dnmWPZPQnNTzg/n7XHUwMDE0TFx1MDAxOVwifYG3Slx1MDAwZteJpNXEcIv/oi99Rlx1MDAwN4yG2//36WJvT1x1MDAxNExKmkuFrOKn4PRcdTAwMGZK/Vx1MDAxN2wifQ== + + + + \ No newline at end of file diff --git a/developers/ocean.py/technical-details.md b/developers/ocean.py/technical-details.md index 613aba81..5fc3b5db 100644 --- a/developers/ocean.py/technical-details.md +++ b/developers/ocean.py/technical-details.md @@ -8,15 +8,29 @@ At the beginning of most flows, we create an `ocean` object, which is an instanc ### Ocean Instance -Ocean class: +#### constructor -
+* **\_\_init\_\_**(`self`, `config_dict: Dict`, `data_provider: Optional[Type] = None`) -Ocean - The Ocean class is the entry point into Ocean Protocol. +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. -[Here ](https://github.com/oceanprotocol/ocean.py/blob/main/ocean\_lib/ocean/ocean.py#LL43C1-L96C53)is the source code. +**Parameters** + +
NameTypeDefault ValueDescription
config_dictdictmandatoryIt contains the configuration as dictionary format.
data_providerOptional[DataProvider]NoneIt is an optional parameter for DataProvider instance, if it is not provided, the constructor will instantiate a fresh one.
+ +**Returns** + +`Ocean` instance + +**Defined in** + +[ocean/ocean.py](https://github.com/oceanprotocol/ocean.py/blob/main/ocean\_lib/ocean/ocean.py#L43) + +
+ +Source code {% code overflow="wrap" %} ```python @@ -79,17 +93,29 @@ class Ocean:
-Config dict attribute: +#### config getter -
- -ocean.config_dict or ocean.config -> dict +**config**(`self`) -> `dict` 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. +**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) + +
+ +Source code + ```python - @property +@property @enforce_types def config(self) -> dict: # alias for config_dict return self.config_dict