Releases: stac-utils/stac-pydantic
Releases · stac-utils/stac-pydantic
3.5.0
What's Changed
-
Mark tests requiring access to the internet by @avalentino in #187
-
switch to uv and hatch by @vincentsarago in #188
-
fix: make sure to return datetime=null event if exclude_none is set by @vincentsarago in #190
from stac_pydantic.api import Item stac_item = Item.model_validate( { "id": "12345", "type": "Feature", "stac_extensions": [], "geometry": None, "properties": { "datetime": None, "start_datetime": "2024-01-01T00:00:00Z", "end_datetime": "2024-01-02T00:00:00Z", }, "collection": "collection", "links": [ { "rel": "self", "href": "http://stac.example.com/catalog/collections/CS3-20160503_132130_04/items/CS3-20160503_132130_04.json" }, { "rel": "collection", "href": "http://stac.example.com/catalog/CS3-20160503_132130_04/catalog.json" }, { "rel": "root", "href": "http://stac.example.com/catalog" } ], "assets": {}, } ) out = stac_item.model_dump(exclude_none=True) # `geometry` is required assert out["geometry"] is None # `datetime` is a required property assert out["properties"]["datetime"] is None # force exclusion of required keys out = stac_item.model_dump(exclude_none=True, exclude={"properties": {"datetime"}, "geometry": True}) assert "geometry" not in out assert "datetime" not in out["properties"]
New Contributors
- @avalentino made their first contribution in #187
Full Changelog: 3.4.0...3.5.0
3.4.0
What's Changed
- remove 'label:assets' property from link by @fmigneault in #184
New Contributors
- @fmigneault made their first contribution in #184
Full Changelog: 3.3.2...3.4.0
3.3.2
What's Changed
- Remove restriction on valid media types for links by @mishaschwartz in #182
New Contributors
- @mishaschwartz made their first contribution in #182
Full Changelog: 3.3.1...3.3.2
3.3.1
What's Changed
- add SearchDatetime back in api.search by @vincentsarago in #180
Full Changelog: 3.3.0...3.3.1
3.3.0
What's Changed
- add datetime validation for collection time intervals by @vincentsarago in #177
- add spatial intervals validation by @vincentsarago in #178
- Release/v3.3.0 by @vincentsarago in #179
Full Changelog: 3.2.0...3.3.0
3.2.0
What's Changed
- move Search field validators outside model by @vincentsarago in #174
- release 3.2.0 by @vincentsarago in #175
Full Changelog: 3.1.5...3.2.0
3.1.5
What's Changed
- Fix
Searchmodel to make sure_start_dateand_end_dateprivateAttr are cleared on model initialization by @vincentsarago in #172 - add octet-stream to mimetypes by @tjellicoe-tpzuk in #169
- fix bbox validation by @ujjwal360 in #167
- update version by @vincentsarago in #173
New Contributors
- @tjellicoe-tpzuk made their first contribution in #169
- @ujjwal360 made their first contribution in #167
Full Changelog: 3.1.4...3.1.5
3.1.4
What's Changed
- fix: use AnyUrl for comparisons by @gadomski in #163
- fix: validate search when datetime is none by @gadomski in #165
- Feature/add python3.13 by @vincentsarago in #164
Full Changelog: 3.1.3...3.1.4
3.1.3
What's Changed
- add numberMatch and numberReturned in api.collections.Collections model by @vincentsarago in #161
- release 3.1.3 by @vincentsarago in #162
Full Changelog: 3.1.2...3.1.3