rs_workflows/catalog_flow.md
Catalog flow implementation
catalog_search(env, catalog_cql2, error_if_empty=False)
async
Search Catalog items.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
env
|
FlowEnvArgs
|
Prefect flow environment (at least the owner_id is required) |
required |
catalog_cql2
|
dict
|
CQL2 filter. |
required |
error_if_empty
|
bool
|
Raise a ValueError if the results are empty. |
False
|
Source code in docs/rs-client-libraries/rs_workflows/catalog_flow.py
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 | |
catalog_search_task(*args, **kwargs)
async
See: search
Source code in docs/rs-client-libraries/rs_workflows/catalog_flow.py
145 146 147 148 | |
get_item(env, target_collection, item)
async
Get a catalog item by its ID.
Source code in docs/rs-client-libraries/rs_workflows/catalog_flow.py
151 152 153 154 155 156 157 158 159 160 161 162 | |
publish(env, target_collections, items)
async
Publish items to the catalog
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
env
|
FlowEnvArgs
|
Prefect flow environment |
required |
collection
|
Catalog collection identifier where the items are published |
required | |
items
|
Items to publish, as STAC dicts or pystac.Items |
required |
Source code in docs/rs-client-libraries/rs_workflows/catalog_flow.py
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 | |
resolve_collection(product_type, target_collections)
Resolve the target collection for a given product type.
Supports input values as strings or tuples (product_type, collection), and input as dict or list of dicts.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
product_type
|
str
|
STAC product type. |
required |
target_collections
|
Dict or list of dicts with target collections. |
required |
Returns:
| Type | Description |
|---|---|
str
|
The resolved target collection. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the product type cannot be resolved. |
Source code in docs/rs-client-libraries/rs_workflows/catalog_flow.py
165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 | |