Skip to content

Module stac_fastapi.types.links

Link helpers.

Variables

INFERRED_LINK_RELS

Functions

def filter_links(
    links: List[Dict]
) -> List[Dict]

Remove inferred links.

def resolve_links(
    links: list,
    base_url: str
) -> List[Dict]

Convert relative links to absolute links.

Classes

class BaseLinks(
    collection_id: str,
    base_url: str
)

Create inferred links common to collections and items.

Descendants

  • stac_fastapi.types.links.CollectionLinks
  • stac_fastapi.types.links.ItemLinks

Methods

root

def root(
    self
) -> Dict[str, Any]

Return the catalog root.

class CollectionLinks(
    collection_id: str,
    base_url: str
)

Create inferred links specific to collections.

Ancestors (in MRO)

  • stac_fastapi.types.links.BaseLinks

Methods

def create_links(
    self
) -> List[Dict[str, Any]]

Return all inferred links.

items

def items(
    self
) -> Dict[str, Any]

Create the items link.

parent

def parent(
    self
) -> Dict[str, Any]

Create the parent link.

root

def root(
    self
) -> Dict[str, Any]

Return the catalog root.

self

def self(
    self
) -> Dict[str, Any]

Create the self link.

class ItemLinks(
    collection_id: str,
    base_url: str,
    item_id: str
)

Create inferred links specific to items.

Ancestors (in MRO)

  • stac_fastapi.types.links.BaseLinks

Methods

collection

def collection(
    self
) -> Dict[str, Any]

Create the collection link.

def create_links(
    self
) -> List[Dict[str, Any]]

Return all inferred links.

parent

def parent(
    self
) -> Dict[str, Any]

Create the parent link.

root

def root(
    self
) -> Dict[str, Any]

Return the catalog root.

self

def self(
    self
) -> Dict[str, Any]

Create the self link.