Module stac_fastapi.sqlalchemy.serializers¶
Serializers.
Classes¶
CollectionSerializer¶
class CollectionSerializer(
)
Serialization methods for STAC collections.
Ancestors (in MRO)¶
- stac_fastapi.sqlalchemy.serializers.Serializer
- abc.ABC
Static methods¶
db_to_stac¶
def db_to_stac(
db_model: stac_fastapi.sqlalchemy.models.database.Collection,
base_url: str
) -> <function TypedDict at 0x7f02795f8dc0>
Transform database model to stac collection.
row_to_dict¶
def row_to_dict(
db_model: sqlalchemy.ext.declarative.api.Base
)
Transform a database model to it's dictionary representation.
stac_to_db¶
def stac_to_db(
stac_data: <function TypedDict at 0x7f02795f8dc0>,
exclude_geometry: bool = False
) -> stac_fastapi.sqlalchemy.models.database.Collection
Transform stac collection to database model.
ItemSerializer¶
class ItemSerializer(
)
Serialization methods for STAC items.
Ancestors (in MRO)¶
- stac_fastapi.sqlalchemy.serializers.Serializer
- abc.ABC
Static methods¶
db_to_stac¶
def db_to_stac(
db_model: stac_fastapi.sqlalchemy.models.database.Item,
base_url: str
) -> stac_fastapi.types.stac.Item
Transform database model to stac item.
row_to_dict¶
def row_to_dict(
db_model: sqlalchemy.ext.declarative.api.Base
)
Transform a database model to it's dictionary representation.
stac_to_db¶
def stac_to_db(
stac_data: <function TypedDict at 0x7f02795f8dc0>,
exclude_geometry: bool = False
) -> stac_fastapi.sqlalchemy.models.database.Item
Transform stac item to database model.
Serializer¶
class Serializer(
)
Defines serialization methods between the API and the data model.
Ancestors (in MRO)¶
- abc.ABC
Descendants¶
- stac_fastapi.sqlalchemy.serializers.ItemSerializer
- stac_fastapi.sqlalchemy.serializers.CollectionSerializer
Static methods¶
db_to_stac¶
def db_to_stac(
db_model: sqlalchemy.ext.declarative.api.Base,
base_url: str
) -> <function TypedDict at 0x7f02795f8dc0>
Transform database model to stac.
row_to_dict¶
def row_to_dict(
db_model: sqlalchemy.ext.declarative.api.Base
)
Transform a database model to it's dictionary representation.
stac_to_db¶
def stac_to_db(
stac_data: <function TypedDict at 0x7f02795f8dc0>,
exclude_geometry: bool = False
) -> sqlalchemy.ext.declarative.api.Base
Transform stac to database model.