Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize
"""


__all__: list[str] = [] # Add all objects you want publicly available to users at this package level


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize
"""


__all__: list[str] = [] # Add all objects you want publicly available to users at this package level


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize
"""


__all__: list[str] = [] # Add all objects you want publicly available to users at this package level


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize
"""


__all__: list[str] = [] # Add all objects you want publicly available to users at this package level


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@

## 1.0.0b1 (1970-01-01)

- Initial version
### Other Changes

- Initial version
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@
Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize
"""

from typing import List

__all__: List[str] = [] # Add all objects you want publicly available to users at this package level
__all__: list[str] = [] # Add all objects you want publicly available to users at this package level


def patch_sdk():
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@
Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize
"""

from typing import List

__all__: List[str] = [] # Add all objects you want publicly available to users at this package level
__all__: list[str] = [] # Add all objects you want publicly available to users at this package level


def patch_sdk():
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@
Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize
"""

from typing import List

__all__: List[str] = [] # Add all objects you want publicly available to users at this package level
__all__: list[str] = [] # Add all objects you want publicly available to users at this package level


def patch_sdk():
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@
Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize
"""

from typing import List

__all__: List[str] = [] # Add all objects you want publicly available to users at this package level
__all__: list[str] = [] # Add all objects you want publicly available to users at this package level


def patch_sdk():
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@
Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize
"""

from typing import List

__all__: List[str] = [] # Add all objects you want publicly available to users at this package level
__all__: list[str] = [] # Add all objects you want publicly available to users at this package level


def patch_sdk():
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@

## 1.0.0b1 (1970-01-01)

- Initial version
### Other Changes

- Initial version
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@
Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize
"""

from typing import List

__all__: List[str] = [] # Add all objects you want publicly available to users at this package level
__all__: list[str] = [] # Add all objects you want publicly available to users at this package level


def patch_sdk():
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@
Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize
"""

from typing import List

__all__: List[str] = [] # Add all objects you want publicly available to users at this package level
__all__: list[str] = [] # Add all objects you want publicly available to users at this package level


def patch_sdk():
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@
Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize
"""

from typing import List

__all__: List[str] = [] # Add all objects you want publicly available to users at this package level
__all__: list[str] = [] # Add all objects you want publicly available to users at this package level


def patch_sdk():
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@
Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize
"""

from typing import List

__all__: List[str] = [] # Add all objects you want publicly available to users at this package level
__all__: list[str] = [] # Add all objects you want publicly available to users at this package level


def patch_sdk():
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@
Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize
"""

from typing import List

__all__: List[str] = [] # Add all objects you want publicly available to users at this package level
__all__: list[str] = [] # Add all objects you want publicly available to users at this package level


def patch_sdk():
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize
"""


__all__: list[str] = [] # Add all objects you want publicly available to users at this package level


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize
"""


__all__: list[str] = [] # Add all objects you want publicly available to users at this package level


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize
"""


__all__: list[str] = [] # Add all objects you want publicly available to users at this package level


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,45 +8,6 @@
Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize
"""

from typing import Type
import geojson
from geojson.geometry import Geometry
from .._utils.model_base import TYPE_HANDLER_REGISTRY


@TYPE_HANDLER_REGISTRY.register_serializer(geojson.Feature)
def feature_serializer(obj: geojson.Feature) -> dict:
"""Serialize a geojson.Feature to a dict.

:param obj: The geojson.Feature object to serialize.
:type obj: geojson.Feature
:return: The serialized feature as a dictionary.
:rtype: dict
"""
return {
"type": obj.type,
"geometry": {"type": obj.geometry.type, "coordinates": obj.geometry.coordinates},
"properties": obj.properties,
"id": obj.id,
}


@TYPE_HANDLER_REGISTRY.register_deserializer(geojson.Feature)
def feature_deserializer(cls: Type[geojson.Feature], data: dict) -> geojson.Feature:
"""Deserialize a dict to a geojson.Feature.

:param data: The dictionary data to deserialize.
:type data: dict
:return: The deserialized geojson.Feature object.
:rtype: geojson.Feature
"""
return cls(
type=data.get("type"),
geometry=Geometry(type=data["geometry"].get("type"), coordinates=data["geometry"].get("coordinates")),
properties=data.get("properties"),
id=data.get("id"),
)


__all__: list[str] = [] # Add all objects you want publicly available to users at this package level

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize
"""


__all__: list[str] = [] # Add all objects you want publicly available to users at this package level


Expand Down
Loading