API objects¶
The following reference is generated from the current Python source with
mkdocstrings.
Client configuration¶
stac_transaction_api_client.client
¶
AuthenticatedClient
¶
A Client which has been authenticated for use on secured endpoints
The following are accepted as keyword arguments and will be used to construct httpx Clients internally:
``base_url``: The base URL for the API, all requests are made to a relative path to this URL
``cookies``: A dictionary of cookies to be sent with every request
``headers``: A dictionary of headers to be sent with every request
``timeout``: The maximum amount of a time a request can take. API functions will raise
httpx.TimeoutException if this is exceeded.
``verify_ssl``: Whether or not to verify the SSL certificate of the API server. This should be True in production,
but can be set to False for testing purposes.
``follow_redirects``: Whether or not to follow redirects. Default value is False.
``httpx_args``: A dictionary of additional arguments to be passed to the ``httpx.Client`` and ``httpx.AsyncClient`` constructor.
| Attributes: |
|
|---|
Source code in src/stac_transaction_api_client/client.py
153 154 155 156 157 158 159 160 161 162 163 164 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 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 | |
__aenter__()
async
¶
Enter a context manager for underlying httpx.AsyncClient—you cannot enter twice (see httpx docs)
Source code in src/stac_transaction_api_client/client.py
289 290 291 292 | |
__aexit__(*args, **kwargs)
async
¶
Exit a context manager for underlying httpx.AsyncClient (see httpx docs)
Source code in src/stac_transaction_api_client/client.py
294 295 296 | |
__enter__()
¶
Enter a context manager for self.client—you cannot enter twice (see httpx docs)
Source code in src/stac_transaction_api_client/client.py
253 254 255 256 | |
__exit__(*args, **kwargs)
¶
Exit a context manager for internal httpx.Client (see httpx docs)
Source code in src/stac_transaction_api_client/client.py
258 259 260 | |
get_async_httpx_client()
¶
Get the underlying httpx.AsyncClient, constructing a new one if not previously set
Source code in src/stac_transaction_api_client/client.py
272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 | |
get_httpx_client()
¶
Get the underlying httpx.Client, constructing a new one if not previously set
Source code in src/stac_transaction_api_client/client.py
236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 | |
set_async_httpx_client(async_client)
¶
Manually set the underlying httpx.AsyncClient
NOTE: This will override any other settings on the client, including cookies, headers, and timeout.
Source code in src/stac_transaction_api_client/client.py
262 263 264 265 266 267 268 269 270 | |
set_httpx_client(client)
¶
Manually set the underlying httpx.Client
NOTE: This will override any other settings on the client, including cookies, headers, and timeout.
Source code in src/stac_transaction_api_client/client.py
228 229 230 231 232 233 234 | |
with_cookies(cookies)
¶
Get a new client matching this one with additional cookies
Source code in src/stac_transaction_api_client/client.py
212 213 214 215 216 217 218 | |
with_headers(headers)
¶
Get a new client matching this one with additional headers
Source code in src/stac_transaction_api_client/client.py
204 205 206 207 208 209 210 | |
with_timeout(timeout)
¶
Get a new client matching this one with a new timeout configuration
Source code in src/stac_transaction_api_client/client.py
220 221 222 223 224 225 226 | |
Client
¶
A class for keeping track of data related to the API
The following are accepted as keyword arguments and will be used to construct httpx Clients internally:
``base_url``: The base URL for the API, all requests are made to a relative path to this URL
``cookies``: A dictionary of cookies to be sent with every request
``headers``: A dictionary of headers to be sent with every request
``timeout``: The maximum amount of a time a request can take. API functions will raise
httpx.TimeoutException if this is exceeded.
``verify_ssl``: Whether or not to verify the SSL certificate of the API server. This should be True in production,
but can be set to False for testing purposes.
``follow_redirects``: Whether or not to follow redirects. Default value is False.
``httpx_args``: A dictionary of additional arguments to be passed to the ``httpx.Client`` and ``httpx.AsyncClient`` constructor.
| Attributes: |
|
|---|
Source code in src/stac_transaction_api_client/client.py
22 23 24 25 26 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 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 143 144 145 146 147 148 149 150 | |
__aenter__()
async
¶
Enter a context manager for underlying httpx.AsyncClient—you cannot enter twice (see httpx docs)
Source code in src/stac_transaction_api_client/client.py
143 144 145 146 | |
__aexit__(*args, **kwargs)
async
¶
Exit a context manager for underlying httpx.AsyncClient (see httpx docs)
Source code in src/stac_transaction_api_client/client.py
148 149 150 | |
__enter__()
¶
Enter a context manager for self.client—you cannot enter twice (see httpx docs)
Source code in src/stac_transaction_api_client/client.py
112 113 114 115 | |
__exit__(*args, **kwargs)
¶
Exit a context manager for internal httpx.Client (see httpx docs)
Source code in src/stac_transaction_api_client/client.py
117 118 119 | |
get_async_httpx_client()
¶
Get the underlying httpx.AsyncClient, constructing a new one if not previously set
Source code in src/stac_transaction_api_client/client.py
129 130 131 132 133 134 135 136 137 138 139 140 141 | |
get_httpx_client()
¶
Get the underlying httpx.Client, constructing a new one if not previously set
Source code in src/stac_transaction_api_client/client.py
98 99 100 101 102 103 104 105 106 107 108 109 110 | |
set_async_httpx_client(async_client)
¶
Manually set the underlying httpx.AsyncClient
NOTE: This will override any other settings on the client, including cookies, headers, and timeout.
Source code in src/stac_transaction_api_client/client.py
121 122 123 124 125 126 127 | |
set_httpx_client(client)
¶
Manually set the underlying httpx.Client
NOTE: This will override any other settings on the client, including cookies, headers, and timeout.
Source code in src/stac_transaction_api_client/client.py
90 91 92 93 94 95 96 | |
with_cookies(cookies)
¶
Get a new client matching this one with additional cookies
Source code in src/stac_transaction_api_client/client.py
74 75 76 77 78 79 80 | |
with_headers(headers)
¶
Get a new client matching this one with additional headers
Source code in src/stac_transaction_api_client/client.py
66 67 68 69 70 71 72 | |
with_timeout(timeout)
¶
Get a new client matching this one with a new timeout configuration
Source code in src/stac_transaction_api_client/client.py
82 83 84 85 86 87 88 | |
Shared response types¶
stac_transaction_api_client.types
¶
Contains some shared types for properties
File
¶
Contains information for file uploads
Source code in src/stac_transaction_api_client/types.py
42 43 44 45 46 47 48 49 50 51 52 | |
to_tuple()
¶
Return a tuple representation that httpx will accept for multipart/form-data
Source code in src/stac_transaction_api_client/types.py
50 51 52 | |
Response
¶
Bases: Generic[T]
A response from an endpoint
Source code in src/stac_transaction_api_client/types.py
58 59 60 61 62 63 64 65 | |
Error response model¶
stac_transaction_api_client.models
¶
Exception
¶
Bases: BaseModel
Information about the exception: an error code plus an optional description.
Source code in src/stac_transaction_api_client/models.py
24 25 26 27 28 29 30 31 32 33 34 | |
Retrieve an item¶
stac_transaction_api_client.api.transaction.get_feature
¶
asyncio_detailed(collection_id, feature_id, *, client)
async
¶
Fetch the feature with id featureId in the feature collection
with id collectionId.
| Parameters: |
|
|---|
| Raises: |
|
|---|
| Returns: |
|
|---|
Source code in src/stac_transaction_api_client/api/transaction/get_feature.py
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 | |
sync_detailed(collection_id, feature_id, *, client)
¶
Fetch the feature with id featureId in the feature collection
with id collectionId.
| Parameters: |
|
|---|
| Raises: |
|
|---|
| Returns: |
|
|---|
Source code in src/stac_transaction_api_client/api/transaction/get_feature.py
65 66 67 68 69 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 | |
Create an item¶
stac_transaction_api_client.api.transaction.post_feature
¶
asyncio(collection_id, *, client, body=UNSET)
async
¶
add a new STAC Item or Items in an ItemCollection to a collection
create a new STAC Item r Items in an ItemCollection in a specific collection
| Parameters: |
|
|---|
| Raises: |
|
|---|
| Returns: |
|
|---|
Source code in src/stac_transaction_api_client/api/transaction/post_feature.py
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 | |
asyncio_detailed(collection_id, *, client, body=UNSET)
async
¶
add a new STAC Item or Items in an ItemCollection to a collection
create a new STAC Item r Items in an ItemCollection in a specific collection
| Parameters: |
|
|---|
| Raises: |
|
|---|
| Returns: |
|---|
Source code in src/stac_transaction_api_client/api/transaction/post_feature.py
144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 | |
sync(collection_id, *, client, body=UNSET)
¶
add a new STAC Item or Items in an ItemCollection to a collection
create a new STAC Item r Items in an ItemCollection in a specific collection
| Parameters: |
|
|---|
| Raises: |
|
|---|
| Returns: |
|
|---|
Source code in src/stac_transaction_api_client/api/transaction/post_feature.py
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 | |
sync_detailed(collection_id, *, client, body=UNSET)
¶
add a new STAC Item or Items in an ItemCollection to a collection
create a new STAC Item r Items in an ItemCollection in a specific collection
| Parameters: |
|
|---|
| Raises: |
|
|---|
| Returns: |
|---|
Source code in src/stac_transaction_api_client/api/transaction/post_feature.py
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 | |
Replace an item¶
stac_transaction_api_client.api.transaction.update_feature
¶
asyncio(collection_id, feature_id, *, client, body=UNSET, if_match)
async
¶
update an existing feature by Id with a complete item definition
Use this method to update an existing feature. Requires the entire GeoJSON description be submitted.
| Parameters: |
|
|---|
| Raises: |
|
|---|
| Returns: |
|
|---|
Source code in src/stac_transaction_api_client/api/transaction/update_feature.py
211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 | |
asyncio_detailed(collection_id, feature_id, *, client, body=UNSET, if_match)
async
¶
update an existing feature by Id with a complete item definition
Use this method to update an existing feature. Requires the entire GeoJSON description be submitted.
| Parameters: |
|
|---|
| Raises: |
|
|---|
| Returns: |
|---|
Source code in src/stac_transaction_api_client/api/transaction/update_feature.py
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 207 208 | |
sync(collection_id, feature_id, *, client, body=UNSET, if_match)
¶
update an existing feature by Id with a complete item definition
Use this method to update an existing feature. Requires the entire GeoJSON description be submitted.
| Parameters: |
|
|---|
| Raises: |
|
|---|
| Returns: |
|
|---|
Source code in src/stac_transaction_api_client/api/transaction/update_feature.py
134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 | |
sync_detailed(collection_id, feature_id, *, client, body=UNSET, if_match)
¶
update an existing feature by Id with a complete item definition
Use this method to update an existing feature. Requires the entire GeoJSON description be submitted.
| Parameters: |
|
|---|
| Raises: |
|
|---|
| Returns: |
|---|
Source code in src/stac_transaction_api_client/api/transaction/update_feature.py
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 | |
Patch an item¶
stac_transaction_api_client.api.transaction.patch_feature
¶
asyncio(collection_id, feature_id, *, client, body=UNSET, if_match=UNSET)
async
¶
update an existing feature by Id with a partial item definition
Use this method to update an existing feature. Requires a GeoJSON fragment (containing the fields to be updated) be submitted.
| Parameters: |
|
|---|
| Raises: |
|
|---|
| Returns: |
|
|---|
Source code in src/stac_transaction_api_client/api/transaction/patch_feature.py
210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 | |
asyncio_detailed(collection_id, feature_id, *, client, body=UNSET, if_match=UNSET)
async
¶
update an existing feature by Id with a partial item definition
Use this method to update an existing feature. Requires a GeoJSON fragment (containing the fields to be updated) be submitted.
| Parameters: |
|
|---|
| Raises: |
|
|---|
| Returns: |
|---|
Source code in src/stac_transaction_api_client/api/transaction/patch_feature.py
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 207 | |
sync(collection_id, feature_id, *, client, body=UNSET, if_match=UNSET)
¶
update an existing feature by Id with a partial item definition
Use this method to update an existing feature. Requires a GeoJSON fragment (containing the fields to be updated) be submitted.
| Parameters: |
|
|---|
| Raises: |
|
|---|
| Returns: |
|
|---|
Source code in src/stac_transaction_api_client/api/transaction/patch_feature.py
133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 | |
sync_detailed(collection_id, feature_id, *, client, body=UNSET, if_match=UNSET)
¶
update an existing feature by Id with a partial item definition
Use this method to update an existing feature. Requires a GeoJSON fragment (containing the fields to be updated) be submitted.
| Parameters: |
|
|---|
| Raises: |
|
|---|
| Returns: |
|---|
Source code in src/stac_transaction_api_client/api/transaction/patch_feature.py
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 | |
Delete an item¶
stac_transaction_api_client.api.transaction.delete_feature
¶
asyncio(collection_id, feature_id, *, client, if_match)
async
¶
delete an existing feature by Id
Use this method to delete an existing feature.
| Parameters: |
|
|---|
| Raises: |
|
|---|
| Returns: |
|
|---|
Source code in src/stac_transaction_api_client/api/transaction/delete_feature.py
186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 | |
asyncio_detailed(collection_id, feature_id, *, client, if_match)
async
¶
delete an existing feature by Id
Use this method to delete an existing feature.
| Parameters: |
|
|---|
| Raises: |
|
|---|
| Returns: |
|---|
Source code in src/stac_transaction_api_client/api/transaction/delete_feature.py
151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 | |
sync(collection_id, feature_id, *, client, if_match)
¶
delete an existing feature by Id
Use this method to delete an existing feature.
| Parameters: |
|
|---|
| Raises: |
|
|---|
| Returns: |
|
|---|
Source code in src/stac_transaction_api_client/api/transaction/delete_feature.py
119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 | |
sync_detailed(collection_id, feature_id, *, client, if_match)
¶
delete an existing feature by Id
Use this method to delete an existing feature.
| Parameters: |
|
|---|
| Raises: |
|
|---|
| Returns: |
|---|
Source code in src/stac_transaction_api_client/api/transaction/delete_feature.py
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 | |