Common source code
The following source code is used in both packages rs_client and rs_workflows:
We can't pass a RsClient instance to the workflow because it causes (de-)serialization issues. So instead we pass the instance parameters, that will be used to recreate a new instance from the workflow.
TODO: also (de-)serialize the pystac_client.Client.open(...) parameters ?
Attributes:
Name | Type | Description |
---|---|---|
cls |
Class
|
RsClient child class type |
rs_server_href |
str
|
RS-Server URL. In local mode, pass None. |
rs_server_api_key |
str
|
API key for RS-Server authentication. |
owner_id |
str
|
ID of the owner of the STAC catalog collections (no special characters allowoed). |
station |
ECadipStation
|
Cadip station (if applicable) |
Source code in docs/rs-client-libraries/rs_common/serialization.py
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
|
get_flow_name
property
Return a unique flow name for Prefect.
__init__(client)
Serialize a RsClient instance.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
client |
RsClient
|
RsClient instance |
required |
Source code in docs/rs-client-libraries/rs_common/serialization.py
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
|
deserialize(logger=None)
Recreate a new RsClient instance from the serialized parameters.
Return
client (RsClient): RsClient instance logger (logging.Logger): Logging instance.
Source code in docs/rs-client-libraries/rs_common/serialization.py
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
|