stac-fastapi.types 6.3.2__tar.gz → 6.4.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (17) hide show
  1. {stac_fastapi_types-6.3.2 → stac_fastapi_types-6.4.0}/PKG-INFO +3 -2
  2. {stac_fastapi_types-6.3.2 → stac_fastapi_types-6.4.0}/pyproject.toml +2 -1
  3. {stac_fastapi_types-6.3.2 → stac_fastapi_types-6.4.0}/stac_fastapi/types/config.py +22 -1
  4. {stac_fastapi_types-6.3.2 → stac_fastapi_types-6.4.0}/stac_fastapi/types/version.py +1 -1
  5. {stac_fastapi_types-6.3.2 → stac_fastapi_types-6.4.0}/.gitignore +0 -0
  6. {stac_fastapi_types-6.3.2 → stac_fastapi_types-6.4.0}/README.md +0 -0
  7. {stac_fastapi_types-6.3.2 → stac_fastapi_types-6.4.0}/stac_fastapi/types/__init__.py +0 -0
  8. {stac_fastapi_types-6.3.2 → stac_fastapi_types-6.4.0}/stac_fastapi/types/conformance.py +0 -0
  9. {stac_fastapi_types-6.3.2 → stac_fastapi_types-6.4.0}/stac_fastapi/types/core.py +0 -0
  10. {stac_fastapi_types-6.3.2 → stac_fastapi_types-6.4.0}/stac_fastapi/types/errors.py +0 -0
  11. {stac_fastapi_types-6.3.2 → stac_fastapi_types-6.4.0}/stac_fastapi/types/extension.py +0 -0
  12. {stac_fastapi_types-6.3.2 → stac_fastapi_types-6.4.0}/stac_fastapi/types/links.py +0 -0
  13. {stac_fastapi_types-6.3.2 → stac_fastapi_types-6.4.0}/stac_fastapi/types/py.typed +0 -0
  14. {stac_fastapi_types-6.3.2 → stac_fastapi_types-6.4.0}/stac_fastapi/types/requests.py +0 -0
  15. {stac_fastapi_types-6.3.2 → stac_fastapi_types-6.4.0}/stac_fastapi/types/rfc3339.py +0 -0
  16. {stac_fastapi_types-6.3.2 → stac_fastapi_types-6.4.0}/stac_fastapi/types/search.py +0 -0
  17. {stac_fastapi_types-6.3.2 → stac_fastapi_types-6.4.0}/stac_fastapi/types/stac.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: stac-fastapi-types
3
- Version: 6.3.2
3
+ Version: 6.4.0
4
4
  Summary: Core API for stac-fastapi modules.
5
5
  Project-URL: Homepage, https://github.com/stac-utils/stac-fastapi
6
6
  Author-email: ArturoAI <engineering@arturo.ai>
@@ -17,7 +17,8 @@ Classifier: Programming Language :: Python :: 3.13
17
17
  Classifier: Programming Language :: Python :: 3.14
18
18
  Requires-Python: >=3.11
19
19
  Requires-Dist: attrs>=23.2.0
20
- Requires-Dist: fastapi>=0.109.0
20
+ Requires-Dist: fastapi>=0.138.2
21
21
  Requires-Dist: iso8601<2.2.0,>=1.0.2
22
22
  Requires-Dist: pydantic-settings>=2
23
23
  Requires-Dist: stac-pydantic<4.0,>=3.3.0
24
+ Requires-Dist: starlette>=1.0.1
@@ -31,7 +31,8 @@ classifiers = [
31
31
  ]
32
32
  dynamic = ["version"]
33
33
  dependencies = [
34
- "fastapi>=0.109.0",
34
+ "fastapi>=0.138.2",
35
+ "starlette>=1.0.1",
35
36
  "attrs>=23.2.0",
36
37
  "pydantic-settings>=2",
37
38
  "stac_pydantic>=3.3.0,<4.0",
@@ -1,10 +1,13 @@
1
1
  """stac_fastapi.types.config module."""
2
2
 
3
+ import logging
3
4
  from typing import Self
4
5
 
5
6
  from pydantic import model_validator
6
7
  from pydantic_settings import BaseSettings, SettingsConfigDict
7
8
 
9
+ logger = logging.getLogger(__name__)
10
+
8
11
 
9
12
  class ApiSettings(BaseSettings):
10
13
  """ApiSettings.
@@ -43,12 +46,30 @@ class ApiSettings(BaseSettings):
43
46
 
44
47
  @model_validator(mode="after")
45
48
  def check_incompatible_options(self) -> Self:
46
- """Check for incompatible options."""
49
+ """Check for incompatible options and warn about default values."""
47
50
  if self.enable_response_models and self.enable_direct_response:
48
51
  raise ValueError(
49
52
  "`enable_reponse_models` and `enable_direct_response` options are incompatible" # noqa: E501
50
53
  )
51
54
 
55
+ defaults_used = []
56
+ if self.stac_fastapi_title == "stac-fastapi":
57
+ defaults_used.append("stac_fastapi_title")
58
+ if self.stac_fastapi_description == "stac-fastapi":
59
+ defaults_used.append("stac_fastapi_description")
60
+ if self.stac_fastapi_landing_id == "stac-fastapi":
61
+ defaults_used.append("stac_fastapi_landing_id")
62
+ if self.stac_fastapi_version == "0.1":
63
+ defaults_used.append("stac_fastapi_version")
64
+
65
+ if defaults_used:
66
+ logger.warning(
67
+ "Using default values for %s. This may impact API discoverability. "
68
+ "Please configure these values via environment variables or settings. "
69
+ "See https://stac-utils.github.io/stac-fastapi/tips-and-tricks/#set-api-title-description-and-version", # noqa: E501
70
+ ", ".join(defaults_used),
71
+ )
72
+
52
73
  return self
53
74
 
54
75
 
@@ -1,3 +1,3 @@
1
1
  """Library version."""
2
2
 
3
- __version__ = "6.3.2"
3
+ __version__ = "6.4.0"