Python API¶
Import the extension from pystac.extensions.application. Use ApplicationExtension.ext() for Items, Catalogs, Collections, Assets, item asset definitions, and Links. Use ApplicationExtension.summaries() for Collection summaries and AssetTemplate for nested template values.
pystac.extensions.application
¶
Generated PySTAC extension. Edit the source schema and regenerate to update.
SCHEMA_URI = 'https://stac-extensions.github.io/application/v0.1.0/schema.json'
module-attribute
¶
FIELD_NAMES = {'container': 'application:container', 'entrypoint': 'application:entrypoint', 'languages': 'application:languages', 'assetTemplates': 'assetTemplates', 'linkTemplates': 'linkTemplates'}
module-attribute
¶
FIELD_TARGETS = {'application:container': ['asset', 'catalog', 'collection', 'item', 'item_asset', 'link', 'summary'], 'application:entrypoint': ['asset', 'catalog', 'collection', 'item', 'item_asset', 'link', 'summary'], 'application:languages': ['asset', 'catalog', 'collection', 'item', 'item_asset', 'link', 'summary'], 'assetTemplates': ['catalog', 'collection'], 'linkTemplates': ['catalog', 'collection']}
module-attribute
¶
TARGETS = ['asset', 'catalog', 'collection', 'item', 'item_asset', 'link', 'summary']
module-attribute
¶
ApplicationExtension
¶
Bases: PropertiesExtension, ExtensionManagementMixin[Item | Collection | Catalog], Generic[T]
Typed property wrapper; use ext() to check/register the extension.
Setters preserve JSON representations, including date/time strings and nested dictionaries. None removes a property; set_null() explicitly writes JSON null. Validate the owning STAC object to enforce full schema constraints.
Source code in pystac/extensions/application.py
281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 | |
assetTemplates: dict[str, AssetTemplate] | None
property
writable
¶
assetTemplates
container: str | None
property
writable
¶
application:container
entrypoint: str | None
property
writable
¶
application:entrypoint
languages: list[str] | None
property
writable
¶
application:languages
linkTemplates: list[AssetTemplate] | None
property
writable
¶
linkTemplates
__init__(obj: T, target: str) -> None
¶
Bind a schema-supported STAC object's metadata for live updates.
Source code in pystac/extensions/application.py
293 294 295 296 297 298 299 300 301 302 303 | |
apply(**values: Any) -> None
¶
Update only supplied fields; omitted fields are preserved.
Keys are generated Python attribute names. Unknown or inapplicable fields are rejected before mutation. Validate the STAC object to check values afterwards.
Source code in pystac/extensions/application.py
341 342 343 344 345 346 347 348 349 350 351 352 | |
clear(name: str) -> None
¶
Remove a field using its generated Python attribute name.
Source code in pystac/extensions/application.py
329 330 331 332 333 | |
ext(obj: T, add_if_missing: bool = False) -> ApplicationExtension[T]
classmethod
¶
Wrap a schema-supported object and optionally register its extension.
Source code in pystac/extensions/application.py
315 316 317 318 319 320 321 322 323 | |
get_schema_uri() -> str
classmethod
¶
The canonical schema identifier used for extension registration.
Source code in pystac/extensions/application.py
305 306 307 308 | |
has_extension(obj: pystac.STACObject) -> bool
classmethod
¶
Check this exact schema version; migrations are not generated.
Source code in pystac/extensions/application.py
310 311 312 313 | |
set_null(name: str) -> None
¶
Write explicit JSON null; schema validation checks whether it is permitted.
Source code in pystac/extensions/application.py
335 336 337 338 339 | |
summaries(obj: pystac.Collection, add_if_missing: bool = False) -> SummariesApplicationExtension
classmethod
¶
Wrap schema-declared Collection summaries and optionally register the extension.
Source code in pystac/extensions/application.py
435 436 437 438 439 440 441 442 443 | |
SummariesApplicationExtension
¶
Bases: SummariesExtension
Collection summaries; ranges, lists and JSON Schema objects are preserved.
Source code in pystac/extensions/application.py
446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 | |
AssetTemplate
dataclass
¶
Bases: _Object
Generated nested value object; unknown JSON members are preserved.
Source code in pystac/extensions/application.py
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 | |
container: str | None
property
writable
¶
application:container
entrypoint: str | None
property
writable
¶
application:entrypoint
languages: list[str] | None
property
writable
¶
application:languages
apply(*, container: str | _Unset | None = _UNSET, entrypoint: str | _Unset | None = _UNSET, languages: list[str] | _Unset | None = _UNSET) -> None
¶
Update supplied members; omitted values are preserved and None removes.
Source code in pystac/extensions/application.py
220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 | |
create(*, container: str | _Unset = _UNSET, entrypoint: str | _Unset = _UNSET, languages: list[str] | _Unset = _UNSET) -> AssetTemplate
classmethod
¶
Create with typed members; omitted optionals are not written.
Explicit None writes null. Validate the STAC object to check value constraints.
Source code in pystac/extensions/application.py
199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 | |