From c887abd74d6cb01b207bbf13f4703aa9c72eff73 Mon Sep 17 00:00:00 2001 From: <> Date: Mon, 9 Oct 2023 11:16:43 +0000 Subject: [PATCH] Deployed 925a9bb with MkDocs version: 1.5.3 --- .nojekyll | 0 404.html | 1729 +++++ api/stac_fastapi/api/app/index.html | 2475 ++++++ api/stac_fastapi/api/config/index.html | 1988 +++++ api/stac_fastapi/api/errors/index.html | 2336 ++++++ api/stac_fastapi/api/index.html | 1829 +++++ api/stac_fastapi/api/middleware/index.html | 2067 +++++ api/stac_fastapi/api/models/index.html | 3740 +++++++++ api/stac_fastapi/api/openapi/index.html | 2097 ++++++ api/stac_fastapi/api/routes/index.html | 2260 ++++++ api/stac_fastapi/api/version/index.html | 1766 +++++ .../extensions/core/context/index.html | 2000 +++++ .../extensions/core/fields/fields/index.html | 2045 +++++ .../extensions/core/fields/index.html | 2064 +++++ .../extensions/core/fields/request/index.html | 2834 +++++++ .../extensions/core/filter/filter/index.html | 2146 ++++++ .../extensions/core/filter/index.html | 2061 +++++ .../extensions/core/filter/request/index.html | 2449 ++++++ api/stac_fastapi/extensions/core/index.html | 3439 +++++++++ .../extensions/core/pagination/index.html | 2188 ++++++ .../core/pagination/pagination/index.html | 2002 +++++ .../pagination/token_pagination/index.html | 2002 +++++ .../extensions/core/query/index.html | 2021 +++++ .../extensions/core/query/query/index.html | 2002 +++++ .../extensions/core/query/request/index.html | 2348 ++++++ .../extensions/core/sort/index.html | 2020 +++++ .../extensions/core/sort/request/index.html | 2348 ++++++ .../extensions/core/sort/sort/index.html | 2001 +++++ .../extensions/core/transaction/index.html | 2344 ++++++ api/stac_fastapi/extensions/index.html | 1824 +++++ .../third_party/bulk_transactions/index.html | 2685 +++++++ .../extensions/third_party/index.html | 2028 +++++ .../extensions/version/index.html | 1768 +++++ api/stac_fastapi/index.html | 1821 +++++ api/stac_fastapi/types/config/index.html | 2405 ++++++ api/stac_fastapi/types/conformance/index.html | 2006 +++++ api/stac_fastapi/types/core/index.html | 4146 ++++++++++ api/stac_fastapi/types/errors/index.html | 2496 ++++++ api/stac_fastapi/types/extension/index.html | 2019 +++++ api/stac_fastapi/types/index.html | 1832 +++++ api/stac_fastapi/types/links/index.html | 2336 ++++++ api/stac_fastapi/types/requests/index.html | 1851 +++++ api/stac_fastapi/types/rfc3339/index.html | 1987 +++++ api/stac_fastapi/types/search/index.html | 2204 ++++++ api/stac_fastapi/types/stac/index.html | 3970 ++++++++++ api/stac_fastapi/types/version/index.html | 1766 +++++ assets/images/favicon.png | Bin 0 -> 1870 bytes assets/javascripts/bundle.94c44541.min.js | 29 + assets/javascripts/bundle.94c44541.min.js.map | 7 + assets/javascripts/lunr/min/lunr.ar.min.js | 1 + assets/javascripts/lunr/min/lunr.da.min.js | 18 + assets/javascripts/lunr/min/lunr.de.min.js | 18 + assets/javascripts/lunr/min/lunr.du.min.js | 18 + assets/javascripts/lunr/min/lunr.es.min.js | 18 + assets/javascripts/lunr/min/lunr.fi.min.js | 18 + assets/javascripts/lunr/min/lunr.fr.min.js | 18 + assets/javascripts/lunr/min/lunr.he.min.js | 1 + assets/javascripts/lunr/min/lunr.hi.min.js | 1 + assets/javascripts/lunr/min/lunr.hu.min.js | 18 + assets/javascripts/lunr/min/lunr.hy.min.js | 1 + assets/javascripts/lunr/min/lunr.it.min.js | 18 + assets/javascripts/lunr/min/lunr.ja.min.js | 1 + assets/javascripts/lunr/min/lunr.jp.min.js | 1 + assets/javascripts/lunr/min/lunr.kn.min.js | 1 + assets/javascripts/lunr/min/lunr.ko.min.js | 1 + assets/javascripts/lunr/min/lunr.multi.min.js | 1 + assets/javascripts/lunr/min/lunr.nl.min.js | 18 + assets/javascripts/lunr/min/lunr.no.min.js | 18 + assets/javascripts/lunr/min/lunr.pt.min.js | 18 + assets/javascripts/lunr/min/lunr.ro.min.js | 18 + assets/javascripts/lunr/min/lunr.ru.min.js | 18 + assets/javascripts/lunr/min/lunr.sa.min.js | 1 + .../lunr/min/lunr.stemmer.support.min.js | 1 + assets/javascripts/lunr/min/lunr.sv.min.js | 18 + assets/javascripts/lunr/min/lunr.ta.min.js | 1 + assets/javascripts/lunr/min/lunr.te.min.js | 1 + assets/javascripts/lunr/min/lunr.th.min.js | 1 + assets/javascripts/lunr/min/lunr.tr.min.js | 18 + assets/javascripts/lunr/min/lunr.vi.min.js | 1 + assets/javascripts/lunr/min/lunr.zh.min.js | 1 + assets/javascripts/lunr/tinyseg.js | 206 + assets/javascripts/lunr/wordcut.js | 6708 +++++++++++++++++ .../workers/search.f886a092.min.js | 42 + .../workers/search.f886a092.min.js.map | 7 + assets/stylesheets/main.bd3936ea.min.css | 1 + assets/stylesheets/main.bd3936ea.min.css.map | 1 + assets/stylesheets/palette.356b1318.min.css | 1 + .../stylesheets/palette.356b1318.min.css.map | 1 + contributing/index.html | 1843 +++++ index.html | 1890 +++++ release-notes/index.html | 2996 ++++++++ search/search_index.json | 1 + sitemap.xml | 3 + sitemap.xml.gz | Bin 0 -> 127 bytes stylesheets/extra.css | 3 + tips-and-tricks/index.html | 1843 +++++ 96 files changed, 117613 insertions(+) create mode 100644 .nojekyll create mode 100644 404.html create mode 100644 api/stac_fastapi/api/app/index.html create mode 100644 api/stac_fastapi/api/config/index.html create mode 100644 api/stac_fastapi/api/errors/index.html create mode 100644 api/stac_fastapi/api/index.html create mode 100644 api/stac_fastapi/api/middleware/index.html create mode 100644 api/stac_fastapi/api/models/index.html create mode 100644 api/stac_fastapi/api/openapi/index.html create mode 100644 api/stac_fastapi/api/routes/index.html create mode 100644 api/stac_fastapi/api/version/index.html create mode 100644 api/stac_fastapi/extensions/core/context/index.html create mode 100644 api/stac_fastapi/extensions/core/fields/fields/index.html create mode 100644 api/stac_fastapi/extensions/core/fields/index.html create mode 100644 api/stac_fastapi/extensions/core/fields/request/index.html create mode 100644 api/stac_fastapi/extensions/core/filter/filter/index.html create mode 100644 api/stac_fastapi/extensions/core/filter/index.html create mode 100644 api/stac_fastapi/extensions/core/filter/request/index.html create mode 100644 api/stac_fastapi/extensions/core/index.html create mode 100644 api/stac_fastapi/extensions/core/pagination/index.html create mode 100644 api/stac_fastapi/extensions/core/pagination/pagination/index.html create mode 100644 api/stac_fastapi/extensions/core/pagination/token_pagination/index.html create mode 100644 api/stac_fastapi/extensions/core/query/index.html create mode 100644 api/stac_fastapi/extensions/core/query/query/index.html create mode 100644 api/stac_fastapi/extensions/core/query/request/index.html create mode 100644 api/stac_fastapi/extensions/core/sort/index.html create mode 100644 api/stac_fastapi/extensions/core/sort/request/index.html create mode 100644 api/stac_fastapi/extensions/core/sort/sort/index.html create mode 100644 api/stac_fastapi/extensions/core/transaction/index.html create mode 100644 api/stac_fastapi/extensions/index.html create mode 100644 api/stac_fastapi/extensions/third_party/bulk_transactions/index.html create mode 100644 api/stac_fastapi/extensions/third_party/index.html create mode 100644 api/stac_fastapi/extensions/version/index.html create mode 100644 api/stac_fastapi/index.html create mode 100644 api/stac_fastapi/types/config/index.html create mode 100644 api/stac_fastapi/types/conformance/index.html create mode 100644 api/stac_fastapi/types/core/index.html create mode 100644 api/stac_fastapi/types/errors/index.html create mode 100644 api/stac_fastapi/types/extension/index.html create mode 100644 api/stac_fastapi/types/index.html create mode 100644 api/stac_fastapi/types/links/index.html create mode 100644 api/stac_fastapi/types/requests/index.html create mode 100644 api/stac_fastapi/types/rfc3339/index.html create mode 100644 api/stac_fastapi/types/search/index.html create mode 100644 api/stac_fastapi/types/stac/index.html create mode 100644 api/stac_fastapi/types/version/index.html create mode 100644 assets/images/favicon.png create mode 100644 assets/javascripts/bundle.94c44541.min.js create mode 100644 assets/javascripts/bundle.94c44541.min.js.map create mode 100644 assets/javascripts/lunr/min/lunr.ar.min.js create mode 100644 assets/javascripts/lunr/min/lunr.da.min.js create mode 100644 assets/javascripts/lunr/min/lunr.de.min.js create mode 100644 assets/javascripts/lunr/min/lunr.du.min.js create mode 100644 assets/javascripts/lunr/min/lunr.es.min.js create mode 100644 assets/javascripts/lunr/min/lunr.fi.min.js create mode 100644 assets/javascripts/lunr/min/lunr.fr.min.js create mode 100644 assets/javascripts/lunr/min/lunr.he.min.js create mode 100644 assets/javascripts/lunr/min/lunr.hi.min.js create mode 100644 assets/javascripts/lunr/min/lunr.hu.min.js create mode 100644 assets/javascripts/lunr/min/lunr.hy.min.js create mode 100644 assets/javascripts/lunr/min/lunr.it.min.js create mode 100644 assets/javascripts/lunr/min/lunr.ja.min.js create mode 100644 assets/javascripts/lunr/min/lunr.jp.min.js create mode 100644 assets/javascripts/lunr/min/lunr.kn.min.js create mode 100644 assets/javascripts/lunr/min/lunr.ko.min.js create mode 100644 assets/javascripts/lunr/min/lunr.multi.min.js create mode 100644 assets/javascripts/lunr/min/lunr.nl.min.js create mode 100644 assets/javascripts/lunr/min/lunr.no.min.js create mode 100644 assets/javascripts/lunr/min/lunr.pt.min.js create mode 100644 assets/javascripts/lunr/min/lunr.ro.min.js create mode 100644 assets/javascripts/lunr/min/lunr.ru.min.js create mode 100644 assets/javascripts/lunr/min/lunr.sa.min.js create mode 100644 assets/javascripts/lunr/min/lunr.stemmer.support.min.js create mode 100644 assets/javascripts/lunr/min/lunr.sv.min.js create mode 100644 assets/javascripts/lunr/min/lunr.ta.min.js create mode 100644 assets/javascripts/lunr/min/lunr.te.min.js create mode 100644 assets/javascripts/lunr/min/lunr.th.min.js create mode 100644 assets/javascripts/lunr/min/lunr.tr.min.js create mode 100644 assets/javascripts/lunr/min/lunr.vi.min.js create mode 100644 assets/javascripts/lunr/min/lunr.zh.min.js create mode 100644 assets/javascripts/lunr/tinyseg.js create mode 100644 assets/javascripts/lunr/wordcut.js create mode 100644 assets/javascripts/workers/search.f886a092.min.js create mode 100644 assets/javascripts/workers/search.f886a092.min.js.map create mode 100644 assets/stylesheets/main.bd3936ea.min.css create mode 100644 assets/stylesheets/main.bd3936ea.min.css.map create mode 100644 assets/stylesheets/palette.356b1318.min.css create mode 100644 assets/stylesheets/palette.356b1318.min.css.map create mode 100644 contributing/index.html create mode 100644 index.html create mode 100644 release-notes/index.html create mode 100644 search/search_index.json create mode 100644 sitemap.xml create mode 100644 sitemap.xml.gz create mode 100644 stylesheets/extra.css create mode 100644 tips-and-tricks/index.html diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 000000000..e69de29bb diff --git a/404.html b/404.html new file mode 100644 index 000000000..a75693cd6 --- /dev/null +++ b/404.html @@ -0,0 +1,1729 @@ + + + +
+ + + + + + + + + + + + + + + + +Fastapi app creation.
+DEFAULT_STATUS_CODES
+
STAC_VERSION
+
class StacApi(
+ settings: stac_fastapi.types.config.ApiSettings,
+ client: Union[stac_fastapi.types.core.AsyncBaseCoreClient, stac_fastapi.types.core.BaseCoreClient],
+ extensions: List[stac_fastapi.types.extension.ApiExtension] = NOTHING,
+ exceptions: Dict[Type[Exception], int] = NOTHING,
+ app: fastapi.applications.FastAPI = NOTHING,
+ router: fastapi.routing.APIRouter = NOTHING,
+ title: str = 'stac-fastapi',
+ api_version: str = '0.1',
+ stac_version: str = '1.0.0',
+ description: str = 'stac-fastapi',
+ search_get_request_model: Type[stac_fastapi.types.search.BaseSearchGetRequest] = <class 'stac_fastapi.types.search.BaseSearchGetRequest'>,
+ search_post_request_model: Type[stac_fastapi.types.search.BaseSearchPostRequest] = <class 'stac_fastapi.types.search.BaseSearchPostRequest'>,
+ pagination_extension=<class 'stac_fastapi.extensions.core.pagination.token_pagination.TokenPaginationExtension'>,
+ response_class: Type[starlette.responses.Response] = <class 'starlette.responses.JSONResponse'>,
+ middlewares: List = NOTHING,
+ route_dependencies: List[Tuple[List[stac_fastapi.api.routes.Scope], List[fastapi.params.Depends]]] = []
+)
+
StacApi factory.
+Factory for creating a STAC-compliant FastAPI application. After
+instantation, the application is accessible from the StacApi.app
attribute.
Name | +Type | +Description | +Default | +
---|---|---|---|
settings | +None | +API settings and configuration, potentially using environment variables. See pydantic-docs.helpmanual.io/usage/settings/. |
+None | +
client | +None | +A subclass of stac_api.clients.BaseCoreClient . Defines theapplication logic which is injected into the API. |
+None | +
extensions | +None | +API extensions to include with the application. This may include official STAC extensions as well as third-party add ons. |
+None | +
exceptions | +None | +Defines a global mapping between exceptions and status codes, allowing configuration of response behavior on certain exceptions (fastapi.tiangolo.com/tutorial/handling-errors/#install-custom-exception-handlers). |
+None | +
app | +None | +The FastAPI application, defaults to a fresh application. | +None | +
route_dependencies | +None | +List of tuples of route scope dicts (eg {'path':<br>'/collections', 'method': 'POST'} ) and list of dependencies (e.g.[Depends(oauth2_scheme)] )). Applies specified dependencies tospecified routes. This is useful for applying custom auth requirements to routes defined elsewhere in the application. |
+None | +
pagination_extension
+
def add_health_check(
+ self
+)
+
Add a health check.
+def add_route_dependencies(
+ self,
+ scopes: List[stac_fastapi.api.routes.Scope],
+ dependencies=typing.List[fastapi.params.Depends]
+) -> None
+
Add custom dependencies to routes.
+Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
scopes | +None | +list of scopes. Each scope should be a dict with a path and method property. |
+None | +
dependencies | +None | +list of FastAPI dependencies to apply to each scope. |
+None | +
Returns:
+Type | +Description | +
---|---|
None | +None | +
def customize_openapi(
+ self
+) -> Union[Dict[str, Any], NoneType]
+
Customize openapi schema.
+def get_extension(
+ self,
+ extension: Type[stac_fastapi.types.extension.ApiExtension]
+) -> Union[stac_fastapi.types.extension.ApiExtension, NoneType]
+
Get an extension.
+Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
extension | +None | +extension to check for. | +None | +
Returns:
+Type | +Description | +
---|---|
None | +The extension instance, if it exists. | +
def register_conformance_classes(
+ self
+)
+
Register conformance classes (GET /conformance).
+Returns:
+Type | +Description | +
---|---|
None | +None | +
def register_core(
+ self
+)
+
Register core STAC endpoints.
+GET / + GET /conformance + GET /collections + GET /collections/{collection_id} + GET /collections/{collection_id}/items + GET /collection/{collection_id}/items/{item_id} + GET /search + POST /search
+Injects application logic (StacApi.client) into the API layer.
+Returns:
+Type | +Description | +
---|---|
None | +None | +
def register_get_collection(
+ self
+)
+
Register get collection endpoint (GET /collection/{collection_id}).
+Returns:
+Type | +Description | +
---|---|
None | +None | +
def register_get_collections(
+ self
+)
+
Register get collections endpoint (GET /collections).
+Returns:
+Type | +Description | +
---|---|
None | +None | +
def register_get_item(
+ self
+)
+
Register get item endpoint (GET /collections/{collection_id}/items/{item_id}).
+Returns:
+Type | +Description | +
---|---|
None | +None | +
def register_get_item_collection(
+ self
+)
+
Register get item collection endpoint (GET /collection/{collection_id}/items).
+Returns:
+Type | +Description | +
---|---|
None | +None | +
def register_get_search(
+ self
+)
+
Register search endpoint (GET /search).
+Returns:
+Type | +Description | +
---|---|
None | +None | +
def register_landing_page(
+ self
+)
+
Register landing page (GET /).
+Returns:
+Type | +Description | +
---|---|
None | +None | +
def register_post_search(
+ self
+)
+
Register search endpoint (POST /search).
+Returns:
+Type | +Description | +
---|---|
None | +None | +
Application settings.
+class AddOns(
+ /,
+ *args,
+ **kwargs
+)
+
Enumeration of available third party add ons.
+bulk_transaction
+
name
+
value
+
class ApiExtensions(
+ /,
+ *args,
+ **kwargs
+)
+
Enumeration of available stac api extensions.
+Ref: @stac-api-extensions
+context
+
fields
+
filter
+
name
+
query
+
sort
+
transaction
+
value
+
Error handling.
+DEFAULT_STATUS_CODES
+
logger
+
def add_exception_handlers(
+ app: fastapi.applications.FastAPI,
+ status_codes: Dict[Type[Exception], int]
+) -> None
+
Add exception handlers to the FastAPI application.
+Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
app | +None | +the FastAPI application. | +None | +
status_codes | +None | +mapping between exceptions and status codes. | +None | +
Returns:
+Type | +Description | +
---|---|
None | +None | +
def exception_handler_factory(
+ status_code: int
+) -> Callable
+
Create a FastAPI exception handler for a particular status code.
+Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
status_code | +None | +HTTP status code. | +None | +
Returns:
+Type | +Description | +
---|---|
callable | +an exception handler. | +
class ErrorResponse(
+ /,
+ *args,
+ **kwargs
+)
+
A JSON error response returned by the API.
+The STAC API spec expects that code
and description
are both present in
+the payload.
Name | +Type | +Description | +Default | +
---|---|---|---|
code | +None | +A code representing the error, semantics are up to implementor. | +None | +
description | +None | +A description of the error. | +None | +
def clear(
+ ...
+)
+
D.clear() -> None. Remove all items from D.
+def copy(
+ ...
+)
+
D.copy() -> a shallow copy of D
+def fromkeys(
+ iterable,
+ value=None,
+ /
+)
+
Create a new dictionary with keys from iterable and values set to value.
+def get(
+ self,
+ key,
+ default=None,
+ /
+)
+
Return the value for key if key is in the dictionary, else default.
+def items(
+ ...
+)
+
D.items() -> a set-like object providing a view on D's items
+def keys(
+ ...
+)
+
D.keys() -> a set-like object providing a view on D's keys
+def pop(
+ ...
+)
+
D.pop(k[,d]) -> v, remove specified key and return the corresponding value.
+If key is not found, d is returned if given, otherwise KeyError is raised
+def popitem(
+ self,
+ /
+)
+
Remove and return a (key, value) pair as a 2-tuple.
+Pairs are returned in LIFO (last-in, first-out) order. +Raises KeyError if the dict is empty.
+def setdefault(
+ self,
+ key,
+ default=None,
+ /
+)
+
Insert key with a value of default if key is not in the dictionary.
+Return the value for key if key is in the dictionary, else default.
+def update(
+ ...
+)
+
D.update([E, ]**F) -> None. Update D from dict/iterable E and F.
+If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] +If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v +In either case, this is followed by: for k in F: D[k] = F[k]
+def values(
+ ...
+)
+
D.values() -> an object providing a view on D's values
+ + + + + + +Api middleware.
+HTTPS_PORT
+
HTTP_PORT
+
class CORSMiddleware(
+ app: Callable[[MutableMapping[str, Any], Callable[[], Awaitable[MutableMapping[str, Any]]], Callable[[MutableMapping[str, Any]], Awaitable[NoneType]]], Awaitable[NoneType]],
+ allow_origins: Sequence[str] = ('*',),
+ allow_methods: Sequence[str] = ('OPTIONS', 'POST', 'GET'),
+ allow_headers: Sequence[str] = ('Content-Type',),
+ allow_credentials: bool = False,
+ allow_origin_regex: Union[str, NoneType] = None,
+ expose_headers: Sequence[str] = (),
+ max_age: int = 600
+)
+
Subclass of Starlette's standard CORS middleware with default values set to those
+recommended by the STAC API spec.
+ +def allow_explicit_origin(
+ headers: starlette.datastructures.MutableHeaders,
+ origin: str
+) -> None
+
def is_allowed_origin(
+ self,
+ origin: str
+) -> bool
+
def preflight_response(
+ self,
+ request_headers: starlette.datastructures.Headers
+) -> starlette.responses.Response
+
def send(
+ self,
+ message: MutableMapping[str, Any],
+ send: Callable[[MutableMapping[str, Any]], Awaitable[NoneType]],
+ request_headers: starlette.datastructures.Headers
+) -> None
+
def simple_response(
+ self,
+ scope: MutableMapping[str, Any],
+ receive: Callable[[], Awaitable[MutableMapping[str, Any]]],
+ send: Callable[[MutableMapping[str, Any]], Awaitable[NoneType]],
+ request_headers: starlette.datastructures.Headers
+) -> None
+
class ProxyHeaderMiddleware(
+ app: Callable[[MutableMapping[str, Any], Callable[[], Awaitable[MutableMapping[str, Any]]], Callable[[MutableMapping[str, Any]], Awaitable[NoneType]]], Awaitable[NoneType]]
+)
+
Account for forwarding headers when deriving base URL.
+Prioritise standard Forwarded header, look for non-standard X-Forwarded-* if missing. +Default to what can be derived from the URL if no headers provided. Middleware updates +the host header that is interpreted by starlette when deriving Request.base_url.
+ + + + + + +Api request/response models.
+def create_get_request_model(
+ extensions,
+ base_model: stac_fastapi.types.search.BaseSearchGetRequest = <class 'stac_fastapi.types.search.BaseSearchGetRequest'>
+)
+
Wrap create_request_model to create the GET request model.
+def create_post_request_model(
+ extensions,
+ base_model: stac_fastapi.types.search.BaseSearchPostRequest = <class 'stac_fastapi.types.search.BaseSearchPostRequest'>
+)
+
Wrap create_request_model to create the POST request model.
+def create_request_model(
+ model_name='SearchGetRequest',
+ base_model: Union[Type[pydantic.main.BaseModel], stac_fastapi.types.search.APIRequest] = <class 'stac_fastapi.types.search.BaseSearchGetRequest'>,
+ extensions: Union[stac_fastapi.types.extension.ApiExtension, NoneType] = None,
+ mixins: Union[pydantic.main.BaseModel, stac_fastapi.types.search.APIRequest, NoneType] = None,
+ request_type: Union[str, NoneType] = 'GET'
+) -> Union[Type[pydantic.main.BaseModel], stac_fastapi.types.search.APIRequest]
+
Create a pydantic model for validating request bodies.
+class CollectionUri(
+ collection_id: str = Path(Ellipsis)
+)
+
Delete collection.
+def kwargs(
+ self
+) -> Dict
+
Transform api request params into format which matches the signature of the
+endpoint.
+class EmptyRequest(
+
+)
+
Empty request.
+def kwargs(
+ self
+) -> Dict
+
Transform api request params into format which matches the signature of the
+endpoint.
+class GETPagination(
+ page: Union[str, NoneType] = None
+)
+
Page based pagination for GET requests.
+def kwargs(
+ self
+) -> Dict
+
Transform api request params into format which matches the signature of the
+endpoint.
+class GETTokenPagination(
+ token: Union[str, NoneType] = None
+)
+
Token pagination for GET requests.
+def kwargs(
+ self
+) -> Dict
+
Transform api request params into format which matches the signature of the
+endpoint.
+class GeoJSONResponse(
+ content: Any,
+ status_code: int = 200,
+ headers: Union[Dict[str, str], NoneType] = None,
+ media_type: Union[str, NoneType] = None,
+ background: Union[starlette.background.BackgroundTask, NoneType] = None
+)
+
JSON with custom, vendor content-type.
+charset
+
media_type
+
headers
+
def delete_cookie(
+ self,
+ key: str,
+ path: str = '/',
+ domain: Union[str, NoneType] = None,
+ secure: bool = False,
+ httponly: bool = False,
+ samesite: Union[Literal['lax', 'strict', 'none'], NoneType] = 'lax'
+) -> None
+
def init_headers(
+ self,
+ headers: Union[Mapping[str, str], NoneType] = None
+) -> None
+
def render(
+ self,
+ content: Any
+) -> bytes
+
def set_cookie(
+ self,
+ key: str,
+ value: str = '',
+ max_age: Union[int, NoneType] = None,
+ expires: Union[datetime.datetime, str, int, NoneType] = None,
+ path: str = '/',
+ domain: Union[str, NoneType] = None,
+ secure: bool = False,
+ httponly: bool = False,
+ samesite: Union[Literal['lax', 'strict', 'none'], NoneType] = 'lax'
+) -> None
+
class ItemCollectionUri(
+ collection_id: str = Path(Ellipsis),
+ limit: int = 10,
+ bbox: str = None,
+ datetime: Union[str, NoneType] = None
+)
+
Get item collection.
+def kwargs(
+ self
+) -> Dict
+
Transform api request params into format which matches the signature of the
+endpoint.
+class ItemUri(
+ collection_id: str = Path(Ellipsis),
+ item_id: str = Path(Ellipsis)
+)
+
Delete item.
+def kwargs(
+ self
+) -> Dict
+
Transform api request params into format which matches the signature of the
+endpoint.
+class JSONSchemaResponse(
+ content: Any,
+ status_code: int = 200,
+ headers: Union[Dict[str, str], NoneType] = None,
+ media_type: Union[str, NoneType] = None,
+ background: Union[starlette.background.BackgroundTask, NoneType] = None
+)
+
JSON with custom, vendor content-type.
+charset
+
media_type
+
headers
+
def delete_cookie(
+ self,
+ key: str,
+ path: str = '/',
+ domain: Union[str, NoneType] = None,
+ secure: bool = False,
+ httponly: bool = False,
+ samesite: Union[Literal['lax', 'strict', 'none'], NoneType] = 'lax'
+) -> None
+
def init_headers(
+ self,
+ headers: Union[Mapping[str, str], NoneType] = None
+) -> None
+
def render(
+ self,
+ content: Any
+) -> bytes
+
def set_cookie(
+ self,
+ key: str,
+ value: str = '',
+ max_age: Union[int, NoneType] = None,
+ expires: Union[datetime.datetime, str, int, NoneType] = None,
+ path: str = '/',
+ domain: Union[str, NoneType] = None,
+ secure: bool = False,
+ httponly: bool = False,
+ samesite: Union[Literal['lax', 'strict', 'none'], NoneType] = 'lax'
+) -> None
+
class POSTPagination(
+ __pydantic_self__,
+ **data: Any
+)
+
Page based pagination for POST requests.
+Config
+
def construct(
+ _fields_set: Union[ForwardRef('SetStr'), NoneType] = None,
+ **values: Any
+) -> 'Model'
+
Creates a new model setting dict and fields_set from trusted or pre-validated data.
+Default values are respected, but no other validation is performed.
+Behaves as if Config.extra = 'allow'
was set since it adds all passed values
def from_orm(
+ obj: Any
+) -> 'Model'
+
def parse_file(
+ path: Union[str, pathlib.Path],
+ *,
+ content_type: 'unicode' = None,
+ encoding: 'unicode' = 'utf8',
+ proto: pydantic.parse.Protocol = None,
+ allow_pickle: bool = False
+) -> 'Model'
+
def parse_obj(
+ obj: Any
+) -> 'Model'
+
def parse_raw(
+ b: Union[str, bytes],
+ *,
+ content_type: 'unicode' = None,
+ encoding: 'unicode' = 'utf8',
+ proto: pydantic.parse.Protocol = None,
+ allow_pickle: bool = False
+) -> 'Model'
+
def schema(
+ by_alias: bool = True,
+ ref_template: 'unicode' = '#/definitions/{model}'
+) -> 'DictStrAny'
+
def schema_json(
+ *,
+ by_alias: bool = True,
+ ref_template: 'unicode' = '#/definitions/{model}',
+ **dumps_kwargs: Any
+) -> 'unicode'
+
def update_forward_refs(
+ **localns: Any
+) -> None
+
Try to update ForwardRefs on fields based on this Model, globalns and localns.
+def validate(
+ value: Any
+) -> 'Model'
+
def copy(
+ self: 'Model',
+ *,
+ include: Union[ForwardRef('AbstractSetIntStr'), ForwardRef('MappingIntStrAny'), NoneType] = None,
+ exclude: Union[ForwardRef('AbstractSetIntStr'), ForwardRef('MappingIntStrAny'), NoneType] = None,
+ update: Union[ForwardRef('DictStrAny'), NoneType] = None,
+ deep: bool = False
+) -> 'Model'
+
Duplicate a model, optionally choose which fields to include, exclude and change.
+Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
include | +None | +fields to include in new model | +None | +
exclude | +None | +fields to exclude from new model, as with values this takes precedence over include | +None | +
update | +None | +values to change/add in the new model. Note: the data is not validated before creating the new model: you should trust this data |
+None | +
deep | +None | +set to True to make a deep copy of the model |
+None | +
Returns:
+Type | +Description | +
---|---|
None | +new model instance | +
def dict(
+ self,
+ *,
+ include: Union[ForwardRef('AbstractSetIntStr'), ForwardRef('MappingIntStrAny'), NoneType] = None,
+ exclude: Union[ForwardRef('AbstractSetIntStr'), ForwardRef('MappingIntStrAny'), NoneType] = None,
+ by_alias: bool = False,
+ skip_defaults: Union[bool, NoneType] = None,
+ exclude_unset: bool = False,
+ exclude_defaults: bool = False,
+ exclude_none: bool = False
+) -> 'DictStrAny'
+
Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.
+def json(
+ self,
+ *,
+ include: Union[ForwardRef('AbstractSetIntStr'), ForwardRef('MappingIntStrAny'), NoneType] = None,
+ exclude: Union[ForwardRef('AbstractSetIntStr'), ForwardRef('MappingIntStrAny'), NoneType] = None,
+ by_alias: bool = False,
+ skip_defaults: Union[bool, NoneType] = None,
+ exclude_unset: bool = False,
+ exclude_defaults: bool = False,
+ exclude_none: bool = False,
+ encoder: Union[Callable[[Any], Any], NoneType] = None,
+ models_as_dict: bool = True,
+ **dumps_kwargs: Any
+) -> 'unicode'
+
Generate a JSON representation of the model, include
and exclude
arguments as per dict()
.
encoder
is an optional function to supply as default
to json.dumps(), other arguments as per json.dumps()
.
class POSTTokenPagination(
+ __pydantic_self__,
+ **data: Any
+)
+
Token pagination model for POST requests.
+Config
+
def construct(
+ _fields_set: Union[ForwardRef('SetStr'), NoneType] = None,
+ **values: Any
+) -> 'Model'
+
Creates a new model setting dict and fields_set from trusted or pre-validated data.
+Default values are respected, but no other validation is performed.
+Behaves as if Config.extra = 'allow'
was set since it adds all passed values
def from_orm(
+ obj: Any
+) -> 'Model'
+
def parse_file(
+ path: Union[str, pathlib.Path],
+ *,
+ content_type: 'unicode' = None,
+ encoding: 'unicode' = 'utf8',
+ proto: pydantic.parse.Protocol = None,
+ allow_pickle: bool = False
+) -> 'Model'
+
def parse_obj(
+ obj: Any
+) -> 'Model'
+
def parse_raw(
+ b: Union[str, bytes],
+ *,
+ content_type: 'unicode' = None,
+ encoding: 'unicode' = 'utf8',
+ proto: pydantic.parse.Protocol = None,
+ allow_pickle: bool = False
+) -> 'Model'
+
def schema(
+ by_alias: bool = True,
+ ref_template: 'unicode' = '#/definitions/{model}'
+) -> 'DictStrAny'
+
def schema_json(
+ *,
+ by_alias: bool = True,
+ ref_template: 'unicode' = '#/definitions/{model}',
+ **dumps_kwargs: Any
+) -> 'unicode'
+
def update_forward_refs(
+ **localns: Any
+) -> None
+
Try to update ForwardRefs on fields based on this Model, globalns and localns.
+def validate(
+ value: Any
+) -> 'Model'
+
def copy(
+ self: 'Model',
+ *,
+ include: Union[ForwardRef('AbstractSetIntStr'), ForwardRef('MappingIntStrAny'), NoneType] = None,
+ exclude: Union[ForwardRef('AbstractSetIntStr'), ForwardRef('MappingIntStrAny'), NoneType] = None,
+ update: Union[ForwardRef('DictStrAny'), NoneType] = None,
+ deep: bool = False
+) -> 'Model'
+
Duplicate a model, optionally choose which fields to include, exclude and change.
+Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
include | +None | +fields to include in new model | +None | +
exclude | +None | +fields to exclude from new model, as with values this takes precedence over include | +None | +
update | +None | +values to change/add in the new model. Note: the data is not validated before creating the new model: you should trust this data |
+None | +
deep | +None | +set to True to make a deep copy of the model |
+None | +
Returns:
+Type | +Description | +
---|---|
None | +new model instance | +
def dict(
+ self,
+ *,
+ include: Union[ForwardRef('AbstractSetIntStr'), ForwardRef('MappingIntStrAny'), NoneType] = None,
+ exclude: Union[ForwardRef('AbstractSetIntStr'), ForwardRef('MappingIntStrAny'), NoneType] = None,
+ by_alias: bool = False,
+ skip_defaults: Union[bool, NoneType] = None,
+ exclude_unset: bool = False,
+ exclude_defaults: bool = False,
+ exclude_none: bool = False
+) -> 'DictStrAny'
+
Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.
+def json(
+ self,
+ *,
+ include: Union[ForwardRef('AbstractSetIntStr'), ForwardRef('MappingIntStrAny'), NoneType] = None,
+ exclude: Union[ForwardRef('AbstractSetIntStr'), ForwardRef('MappingIntStrAny'), NoneType] = None,
+ by_alias: bool = False,
+ skip_defaults: Union[bool, NoneType] = None,
+ exclude_unset: bool = False,
+ exclude_defaults: bool = False,
+ exclude_none: bool = False,
+ encoder: Union[Callable[[Any], Any], NoneType] = None,
+ models_as_dict: bool = True,
+ **dumps_kwargs: Any
+) -> 'unicode'
+
Generate a JSON representation of the model, include
and exclude
arguments as per dict()
.
encoder
is an optional function to supply as default
to json.dumps(), other arguments as per json.dumps()
.
openapi.
+def config_openapi(
+ app: fastapi.applications.FastAPI,
+ settings: stac_fastapi.types.config.ApiSettings
+)
+
Config openapi.
+def update_openapi(
+ app: fastapi.applications.FastAPI
+) -> fastapi.applications.FastAPI
+
Update OpenAPI response content-type.
+This function modifies the openapi route to comply with the STAC API spec's required +content-type response header.
+class VndOaiResponse(
+ *args,
+ **kwargs
+)
+
JSON with custom, vendor content-type.
+charset
+
media_type
+
headers
+
def delete_cookie(
+ self,
+ key: str,
+ path: str = '/',
+ domain: Union[str, NoneType] = None,
+ secure: bool = False,
+ httponly: bool = False,
+ samesite: Union[Literal['lax', 'strict', 'none'], NoneType] = 'lax'
+) -> None
+
def init_headers(
+ self,
+ headers: Union[Mapping[str, str], NoneType] = None
+) -> None
+
def render(
+ self,
+ content: Any
+) -> bytes
+
def set_cookie(
+ self,
+ key: str,
+ value: str = '',
+ max_age: Union[int, NoneType] = None,
+ expires: Union[datetime.datetime, str, int, NoneType] = None,
+ path: str = '/',
+ domain: Union[str, NoneType] = None,
+ secure: bool = False,
+ httponly: bool = False,
+ samesite: Union[Literal['lax', 'strict', 'none'], NoneType] = 'lax'
+) -> None
+
Route factories.
+HTTP_204_NO_CONTENT
+
def add_route_dependencies(
+ routes: List[starlette.routing.BaseRoute],
+ scopes: List[stac_fastapi.api.routes.Scope],
+ dependencies=typing.List[fastapi.params.Depends]
+) -> None
+
Add dependencies to routes.
+Allows a developer to add dependencies to a route after the route has been +defined.
+Returns:
+Type | +Description | +
---|---|
None | +None | +
def create_async_endpoint(
+ func: Callable,
+ request_model: Union[Type[stac_fastapi.types.search.APIRequest], Type[pydantic.main.BaseModel], Dict],
+ response_class: Type[starlette.responses.Response] = <class 'starlette.responses.JSONResponse'>
+)
+
Wrap a function in a coroutine which may be used to create a FastAPI endpoint.
+Synchronous functions are executed asynchronously using a background thread.
+def sync_to_async(
+ func
+)
+
Run synchronous function asynchronously in a background thread.
+class Scope(
+ /,
+ *args,
+ **kwargs
+)
+
More strict version of Starlette's Scope.
+def clear(
+ ...
+)
+
D.clear() -> None. Remove all items from D.
+def copy(
+ ...
+)
+
D.copy() -> a shallow copy of D
+def fromkeys(
+ iterable,
+ value=None,
+ /
+)
+
Create a new dictionary with keys from iterable and values set to value.
+def get(
+ self,
+ key,
+ default=None,
+ /
+)
+
Return the value for key if key is in the dictionary, else default.
+def items(
+ ...
+)
+
D.items() -> a set-like object providing a view on D's items
+def keys(
+ ...
+)
+
D.keys() -> a set-like object providing a view on D's keys
+def pop(
+ ...
+)
+
D.pop(k[,d]) -> v, remove specified key and return the corresponding value.
+If key is not found, d is returned if given, otherwise KeyError is raised
+def popitem(
+ self,
+ /
+)
+
Remove and return a (key, value) pair as a 2-tuple.
+Pairs are returned in LIFO (last-in, first-out) order. +Raises KeyError if the dict is empty.
+def setdefault(
+ self,
+ key,
+ default=None,
+ /
+)
+
Insert key with a value of default if key is not in the dictionary.
+Return the value for key if key is in the dictionary, else default.
+def update(
+ ...
+)
+
D.update([E, ]**F) -> None. Update D from dict/iterable E and F.
+If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] +If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v +In either case, this is followed by: for k in F: D[k] = F[k]
+def values(
+ ...
+)
+
D.values() -> an object providing a view on D's values
+ + + + + + +Library version.
+ + + + + + +Context extension.
+class ContextExtension(
+ conformance_classes: List[str] = NOTHING,
+ schema_href: Union[str, NoneType] = 'https://raw.githubusercontent.com/stac-api-extensions/context/v1.0.0-rc.2/json-schema/schema.json'
+)
+
Context Extension.
+The Context extension adds a JSON object to ItemCollection responses (/search
,
+/collections/{collection_id}/items
) which includes the number of items matched,
+returned, and the limit requested.
+stac-api-extensions/context
GET
+
POST
+
def get_request_model(
+ self,
+ verb: Union[str, NoneType] = 'GET'
+) -> Union[pydantic.main.BaseModel, NoneType]
+
Return the request model for the extension.method.
+The model can differ based on HTTP verb
+def register(
+ self,
+ app: fastapi.applications.FastAPI
+) -> None
+
Register the extension with a FastAPI application.
+Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
app | +None | +target FastAPI application. | +None | +
Returns:
+Type | +Description | +
---|---|
None | +None | +
Fields extension.
+class FieldsExtension(
+ conformance_classes: List[str] = NOTHING,
+ default_includes: Set[str] = NOTHING,
+ schema_href: Union[str, NoneType] = None
+)
+
Fields Extension.
+The Fields extension adds functionality to the /search
endpoint which
+allows the caller to include or exclude specific from the API response.
+Registering this extension with the application has the added effect of
+removing the ItemCollection
response model from the /search
endpoint, as
+the Fields extension allows the API to return potentially invalid responses
+by excluding fields which are required by the STAC spec, such as geometry.
Name | +Type | +Description | +Default | +
---|---|---|---|
default_includes | +set | +defines the default set of included fields. | +None | +
conformance_classes | +list | +Defines the list of conformance classes for the extension |
+None | +
GET
+
POST
+
def get_request_model(
+ self,
+ verb: Union[str, NoneType] = 'GET'
+) -> Union[pydantic.main.BaseModel, NoneType]
+
Return the request model for the extension.method.
+The model can differ based on HTTP verb
+def register(
+ self,
+ app: fastapi.applications.FastAPI
+) -> None
+
Register the extension with a FastAPI application.
+Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
app | +fastapi.FastAPI | +target FastAPI application. | +None | +
Returns:
+Type | +Description | +
---|---|
None | +None | +
Fields extension module.
+class FieldsExtension(
+ conformance_classes: List[str] = NOTHING,
+ default_includes: Set[str] = NOTHING,
+ schema_href: Union[str, NoneType] = None
+)
+
Fields Extension.
+The Fields extension adds functionality to the /search
endpoint which
+allows the caller to include or exclude specific from the API response.
+Registering this extension with the application has the added effect of
+removing the ItemCollection
response model from the /search
endpoint, as
+the Fields extension allows the API to return potentially invalid responses
+by excluding fields which are required by the STAC spec, such as geometry.
Name | +Type | +Description | +Default | +
---|---|---|---|
default_includes | +set | +defines the default set of included fields. | +None | +
conformance_classes | +list | +Defines the list of conformance classes for the extension |
+None | +
GET
+
POST
+
def get_request_model(
+ self,
+ verb: Union[str, NoneType] = 'GET'
+) -> Union[pydantic.main.BaseModel, NoneType]
+
Return the request model for the extension.method.
+The model can differ based on HTTP verb
+def register(
+ self,
+ app: fastapi.applications.FastAPI
+) -> None
+
Register the extension with a FastAPI application.
+Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
app | +fastapi.FastAPI | +target FastAPI application. | +None | +
Returns:
+Type | +Description | +
---|---|
None | +None | +
Request models for the fields extension.
+class FieldsExtensionGetRequest(
+ fields: str = None
+)
+
Additional fields for the GET request.
+def kwargs(
+ self
+) -> Dict
+
Transform api request params into format which matches the signature of the
+endpoint.
+class FieldsExtensionPostRequest(
+ __pydantic_self__,
+ **data: Any
+)
+
Additional fields and schema for the POST request.
+Config
+
def construct(
+ _fields_set: Union[ForwardRef('SetStr'), NoneType] = None,
+ **values: Any
+) -> 'Model'
+
Creates a new model setting dict and fields_set from trusted or pre-validated data.
+Default values are respected, but no other validation is performed.
+Behaves as if Config.extra = 'allow'
was set since it adds all passed values
def from_orm(
+ obj: Any
+) -> 'Model'
+
def parse_file(
+ path: Union[str, pathlib.Path],
+ *,
+ content_type: 'unicode' = None,
+ encoding: 'unicode' = 'utf8',
+ proto: pydantic.parse.Protocol = None,
+ allow_pickle: bool = False
+) -> 'Model'
+
def parse_obj(
+ obj: Any
+) -> 'Model'
+
def parse_raw(
+ b: Union[str, bytes],
+ *,
+ content_type: 'unicode' = None,
+ encoding: 'unicode' = 'utf8',
+ proto: pydantic.parse.Protocol = None,
+ allow_pickle: bool = False
+) -> 'Model'
+
def schema(
+ by_alias: bool = True,
+ ref_template: 'unicode' = '#/definitions/{model}'
+) -> 'DictStrAny'
+
def schema_json(
+ *,
+ by_alias: bool = True,
+ ref_template: 'unicode' = '#/definitions/{model}',
+ **dumps_kwargs: Any
+) -> 'unicode'
+
def update_forward_refs(
+ **localns: Any
+) -> None
+
Try to update ForwardRefs on fields based on this Model, globalns and localns.
+def validate(
+ value: Any
+) -> 'Model'
+
def copy(
+ self: 'Model',
+ *,
+ include: Union[ForwardRef('AbstractSetIntStr'), ForwardRef('MappingIntStrAny'), NoneType] = None,
+ exclude: Union[ForwardRef('AbstractSetIntStr'), ForwardRef('MappingIntStrAny'), NoneType] = None,
+ update: Union[ForwardRef('DictStrAny'), NoneType] = None,
+ deep: bool = False
+) -> 'Model'
+
Duplicate a model, optionally choose which fields to include, exclude and change.
+Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
include | +None | +fields to include in new model | +None | +
exclude | +None | +fields to exclude from new model, as with values this takes precedence over include | +None | +
update | +None | +values to change/add in the new model. Note: the data is not validated before creating the new model: you should trust this data |
+None | +
deep | +None | +set to True to make a deep copy of the model |
+None | +
Returns:
+Type | +Description | +
---|---|
None | +new model instance | +
def dict(
+ self,
+ *,
+ include: Union[ForwardRef('AbstractSetIntStr'), ForwardRef('MappingIntStrAny'), NoneType] = None,
+ exclude: Union[ForwardRef('AbstractSetIntStr'), ForwardRef('MappingIntStrAny'), NoneType] = None,
+ by_alias: bool = False,
+ skip_defaults: Union[bool, NoneType] = None,
+ exclude_unset: bool = False,
+ exclude_defaults: bool = False,
+ exclude_none: bool = False
+) -> 'DictStrAny'
+
Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.
+def json(
+ self,
+ *,
+ include: Union[ForwardRef('AbstractSetIntStr'), ForwardRef('MappingIntStrAny'), NoneType] = None,
+ exclude: Union[ForwardRef('AbstractSetIntStr'), ForwardRef('MappingIntStrAny'), NoneType] = None,
+ by_alias: bool = False,
+ skip_defaults: Union[bool, NoneType] = None,
+ exclude_unset: bool = False,
+ exclude_defaults: bool = False,
+ exclude_none: bool = False,
+ encoder: Union[Callable[[Any], Any], NoneType] = None,
+ models_as_dict: bool = True,
+ **dumps_kwargs: Any
+) -> 'unicode'
+
Generate a JSON representation of the model, include
and exclude
arguments as per dict()
.
encoder
is an optional function to supply as default
to json.dumps(), other arguments as per json.dumps()
.
class PostFieldsExtension(
+ __pydantic_self__,
+ **data: Any
+)
+
FieldsExtension.
+Name | +Type | +Description | +Default | +
---|---|---|---|
include | +None | +set of fields to include. | +None | +
exclude | +None | +set of fields to exclude. | +None | +
Config
+
def construct(
+ _fields_set: Union[ForwardRef('SetStr'), NoneType] = None,
+ **values: Any
+) -> 'Model'
+
Creates a new model setting dict and fields_set from trusted or pre-validated data.
+Default values are respected, but no other validation is performed.
+Behaves as if Config.extra = 'allow'
was set since it adds all passed values
def from_orm(
+ obj: Any
+) -> 'Model'
+
def parse_file(
+ path: Union[str, pathlib.Path],
+ *,
+ content_type: 'unicode' = None,
+ encoding: 'unicode' = 'utf8',
+ proto: pydantic.parse.Protocol = None,
+ allow_pickle: bool = False
+) -> 'Model'
+
def parse_obj(
+ obj: Any
+) -> 'Model'
+
def parse_raw(
+ b: Union[str, bytes],
+ *,
+ content_type: 'unicode' = None,
+ encoding: 'unicode' = 'utf8',
+ proto: pydantic.parse.Protocol = None,
+ allow_pickle: bool = False
+) -> 'Model'
+
def schema(
+ by_alias: bool = True,
+ ref_template: 'unicode' = '#/definitions/{model}'
+) -> 'DictStrAny'
+
def schema_json(
+ *,
+ by_alias: bool = True,
+ ref_template: 'unicode' = '#/definitions/{model}',
+ **dumps_kwargs: Any
+) -> 'unicode'
+
def update_forward_refs(
+ **localns: Any
+) -> None
+
Try to update ForwardRefs on fields based on this Model, globalns and localns.
+def validate(
+ value: Any
+) -> 'Model'
+
filter_fields
+
Create pydantic include/exclude expression.
+Create dictionary of fields to include/exclude on model export based on +the included and excluded fields passed to the API +Ref: pydantic-docs.helpmanual.io/usage/exporting_models/#advanced-include-and-exclude
+def copy(
+ self: 'Model',
+ *,
+ include: Union[ForwardRef('AbstractSetIntStr'), ForwardRef('MappingIntStrAny'), NoneType] = None,
+ exclude: Union[ForwardRef('AbstractSetIntStr'), ForwardRef('MappingIntStrAny'), NoneType] = None,
+ update: Union[ForwardRef('DictStrAny'), NoneType] = None,
+ deep: bool = False
+) -> 'Model'
+
Duplicate a model, optionally choose which fields to include, exclude and change.
+Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
include | +None | +fields to include in new model | +None | +
exclude | +None | +fields to exclude from new model, as with values this takes precedence over include | +None | +
update | +None | +values to change/add in the new model. Note: the data is not validated before creating the new model: you should trust this data |
+None | +
deep | +None | +set to True to make a deep copy of the model |
+None | +
Returns:
+Type | +Description | +
---|---|
None | +new model instance | +
def dict(
+ self,
+ *,
+ include: Union[ForwardRef('AbstractSetIntStr'), ForwardRef('MappingIntStrAny'), NoneType] = None,
+ exclude: Union[ForwardRef('AbstractSetIntStr'), ForwardRef('MappingIntStrAny'), NoneType] = None,
+ by_alias: bool = False,
+ skip_defaults: Union[bool, NoneType] = None,
+ exclude_unset: bool = False,
+ exclude_defaults: bool = False,
+ exclude_none: bool = False
+) -> 'DictStrAny'
+
Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.
+def json(
+ self,
+ *,
+ include: Union[ForwardRef('AbstractSetIntStr'), ForwardRef('MappingIntStrAny'), NoneType] = None,
+ exclude: Union[ForwardRef('AbstractSetIntStr'), ForwardRef('MappingIntStrAny'), NoneType] = None,
+ by_alias: bool = False,
+ skip_defaults: Union[bool, NoneType] = None,
+ exclude_unset: bool = False,
+ exclude_defaults: bool = False,
+ exclude_none: bool = False,
+ encoder: Union[Callable[[Any], Any], NoneType] = None,
+ models_as_dict: bool = True,
+ **dumps_kwargs: Any
+) -> 'unicode'
+
Generate a JSON representation of the model, include
and exclude
arguments as per dict()
.
encoder
is an optional function to supply as default
to json.dumps(), other arguments as per json.dumps()
.
Filter Extension.
+class FilterConformanceClasses(
+ /,
+ *args,
+ **kwargs
+)
+
Conformance classes for the Filter extension.
+See +stac-api-extensions/filter
+ACCENT_CASE_INSENSITIVE_COMPARISON
+
ADVANCED_COMPARISON_OPERATORS
+
ARITHMETIC
+
ARRAYS
+
BASIC_CQL2
+
BASIC_SPATIAL_OPERATORS
+
CQL2_JSON
+
CQL2_TEXT
+
FEATURES_FILTER
+
FILTER
+
FUNCTIONS
+
ITEM_SEARCH_FILTER
+
PROPERTY_PROPERTY
+
SPATIAL_OPERATORS
+
TEMPORAL_OPERATORS
+
name
+
value
+
class FilterExtension(
+ schema_href: Union[str, NoneType] = None,
+ client: Union[stac_fastapi.types.core.AsyncBaseFiltersClient, stac_fastapi.types.core.BaseFiltersClient] = NOTHING,
+ conformance_classes: List[str] = [<FilterConformanceClasses.FILTER: 'http://www.opengis.net/spec/ogcapi-features-3/1.0/conf/filter'>, <FilterConformanceClasses.FEATURES_FILTER: 'http://www.opengis.net/spec/ogcapi-features-3/1.0/conf/features-filter'>, <FilterConformanceClasses.ITEM_SEARCH_FILTER: 'https://api.stacspec.org/v1.0.0-rc.2/item-search#filter'>, <FilterConformanceClasses.BASIC_CQL2: 'http://www.opengis.net/spec/cql2/1.0/conf/basic-cql2'>, <FilterConformanceClasses.CQL2_TEXT: 'http://www.opengis.net/spec/cql2/1.0/conf/cql2-text'>],
+ router: fastapi.routing.APIRouter = NOTHING,
+ response_class: Type[starlette.responses.Response] = <class 'stac_fastapi.api.models.JSONSchemaResponse'>
+)
+
Filter Extension.
+The filter extension adds several endpoints which allow the retrieval of +queryables and provides an expressive mechanism for searching based on Item
+Name | +Type | +Description | +Default | +
---|---|---|---|
client | +None | +Queryables endpoint logic | +None | +
conformance_classes | +None | +Conformance classes provided by the extension | +None | +
GET
+
POST
+
def get_request_model(
+ self,
+ verb: Union[str, NoneType] = 'GET'
+) -> Union[pydantic.main.BaseModel, NoneType]
+
Return the request model for the extension.method.
+The model can differ based on HTTP verb
+def register(
+ self,
+ app: fastapi.applications.FastAPI
+) -> None
+
Register the extension with a FastAPI application.
+Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
app | +None | +target FastAPI application. | +None | +
Returns:
+Type | +Description | +
---|---|
None | +None | +
Filter extension module.
+class FilterExtension(
+ schema_href: Union[str, NoneType] = None,
+ client: Union[stac_fastapi.types.core.AsyncBaseFiltersClient, stac_fastapi.types.core.BaseFiltersClient] = NOTHING,
+ conformance_classes: List[str] = [<FilterConformanceClasses.FILTER: 'http://www.opengis.net/spec/ogcapi-features-3/1.0/conf/filter'>, <FilterConformanceClasses.FEATURES_FILTER: 'http://www.opengis.net/spec/ogcapi-features-3/1.0/conf/features-filter'>, <FilterConformanceClasses.ITEM_SEARCH_FILTER: 'https://api.stacspec.org/v1.0.0-rc.2/item-search#filter'>, <FilterConformanceClasses.BASIC_CQL2: 'http://www.opengis.net/spec/cql2/1.0/conf/basic-cql2'>, <FilterConformanceClasses.CQL2_TEXT: 'http://www.opengis.net/spec/cql2/1.0/conf/cql2-text'>],
+ router: fastapi.routing.APIRouter = NOTHING,
+ response_class: Type[starlette.responses.Response] = <class 'stac_fastapi.api.models.JSONSchemaResponse'>
+)
+
Filter Extension.
+The filter extension adds several endpoints which allow the retrieval of +queryables and provides an expressive mechanism for searching based on Item
+Name | +Type | +Description | +Default | +
---|---|---|---|
client | +None | +Queryables endpoint logic | +None | +
conformance_classes | +None | +Conformance classes provided by the extension | +None | +
GET
+
POST
+
def get_request_model(
+ self,
+ verb: Union[str, NoneType] = 'GET'
+) -> Union[pydantic.main.BaseModel, NoneType]
+
Return the request model for the extension.method.
+The model can differ based on HTTP verb
+def register(
+ self,
+ app: fastapi.applications.FastAPI
+) -> None
+
Register the extension with a FastAPI application.
+Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
app | +None | +target FastAPI application. | +None | +
Returns:
+Type | +Description | +
---|---|
None | +None | +
Filter extension request models.
+class FilterExtensionGetRequest(
+ filter: Union[str, NoneType] = None
+)
+
Filter extension GET request model.
+filter_crs
+
filter_lang
+
def kwargs(
+ self
+) -> Dict
+
Transform api request params into format which matches the signature of the
+endpoint.
+class FilterExtensionPostRequest(
+ __pydantic_self__,
+ **data: Any
+)
+
Filter extension POST request model.
+Config
+
def construct(
+ _fields_set: Union[ForwardRef('SetStr'), NoneType] = None,
+ **values: Any
+) -> 'Model'
+
Creates a new model setting dict and fields_set from trusted or pre-validated data.
+Default values are respected, but no other validation is performed.
+Behaves as if Config.extra = 'allow'
was set since it adds all passed values
def from_orm(
+ obj: Any
+) -> 'Model'
+
def parse_file(
+ path: Union[str, pathlib.Path],
+ *,
+ content_type: 'unicode' = None,
+ encoding: 'unicode' = 'utf8',
+ proto: pydantic.parse.Protocol = None,
+ allow_pickle: bool = False
+) -> 'Model'
+
def parse_obj(
+ obj: Any
+) -> 'Model'
+
def parse_raw(
+ b: Union[str, bytes],
+ *,
+ content_type: 'unicode' = None,
+ encoding: 'unicode' = 'utf8',
+ proto: pydantic.parse.Protocol = None,
+ allow_pickle: bool = False
+) -> 'Model'
+
def schema(
+ by_alias: bool = True,
+ ref_template: 'unicode' = '#/definitions/{model}'
+) -> 'DictStrAny'
+
def schema_json(
+ *,
+ by_alias: bool = True,
+ ref_template: 'unicode' = '#/definitions/{model}',
+ **dumps_kwargs: Any
+) -> 'unicode'
+
def update_forward_refs(
+ **localns: Any
+) -> None
+
Try to update ForwardRefs on fields based on this Model, globalns and localns.
+def validate(
+ value: Any
+) -> 'Model'
+
def copy(
+ self: 'Model',
+ *,
+ include: Union[ForwardRef('AbstractSetIntStr'), ForwardRef('MappingIntStrAny'), NoneType] = None,
+ exclude: Union[ForwardRef('AbstractSetIntStr'), ForwardRef('MappingIntStrAny'), NoneType] = None,
+ update: Union[ForwardRef('DictStrAny'), NoneType] = None,
+ deep: bool = False
+) -> 'Model'
+
Duplicate a model, optionally choose which fields to include, exclude and change.
+Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
include | +None | +fields to include in new model | +None | +
exclude | +None | +fields to exclude from new model, as with values this takes precedence over include | +None | +
update | +None | +values to change/add in the new model. Note: the data is not validated before creating the new model: you should trust this data |
+None | +
deep | +None | +set to True to make a deep copy of the model |
+None | +
Returns:
+Type | +Description | +
---|---|
None | +new model instance | +
def dict(
+ self,
+ *,
+ include: Union[ForwardRef('AbstractSetIntStr'), ForwardRef('MappingIntStrAny'), NoneType] = None,
+ exclude: Union[ForwardRef('AbstractSetIntStr'), ForwardRef('MappingIntStrAny'), NoneType] = None,
+ by_alias: bool = False,
+ skip_defaults: Union[bool, NoneType] = None,
+ exclude_unset: bool = False,
+ exclude_defaults: bool = False,
+ exclude_none: bool = False
+) -> 'DictStrAny'
+
Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.
+def json(
+ self,
+ *,
+ include: Union[ForwardRef('AbstractSetIntStr'), ForwardRef('MappingIntStrAny'), NoneType] = None,
+ exclude: Union[ForwardRef('AbstractSetIntStr'), ForwardRef('MappingIntStrAny'), NoneType] = None,
+ by_alias: bool = False,
+ skip_defaults: Union[bool, NoneType] = None,
+ exclude_unset: bool = False,
+ exclude_defaults: bool = False,
+ exclude_none: bool = False,
+ encoder: Union[Callable[[Any], Any], NoneType] = None,
+ models_as_dict: bool = True,
+ **dumps_kwargs: Any
+) -> 'unicode'
+
Generate a JSON representation of the model, include
and exclude
arguments as per dict()
.
encoder
is an optional function to supply as default
to json.dumps(), other arguments as per json.dumps()
.
class FilterLang(
+ /,
+ *args,
+ **kwargs
+)
+
Choices for filter-lang value in a POST request.
+Based on +stac-api-extensions/filter#queryables
+Note the addition of cql2-json, which is used by the pgstac backend, +but is not included in the spec above.
+cql2_json
+
cql2_text
+
cql_json
+
name
+
value
+
stac_api.extensions.core module.
+class ContextExtension(
+ conformance_classes: List[str] = NOTHING,
+ schema_href: Union[str, NoneType] = 'https://raw.githubusercontent.com/stac-api-extensions/context/v1.0.0-rc.2/json-schema/schema.json'
+)
+
Context Extension.
+The Context extension adds a JSON object to ItemCollection responses (/search
,
+/collections/{collection_id}/items
) which includes the number of items matched,
+returned, and the limit requested.
+stac-api-extensions/context
GET
+
POST
+
def get_request_model(
+ self,
+ verb: Union[str, NoneType] = 'GET'
+) -> Union[pydantic.main.BaseModel, NoneType]
+
Return the request model for the extension.method.
+The model can differ based on HTTP verb
+def register(
+ self,
+ app: fastapi.applications.FastAPI
+) -> None
+
Register the extension with a FastAPI application.
+Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
app | +None | +target FastAPI application. | +None | +
Returns:
+Type | +Description | +
---|---|
None | +None | +
class FieldsExtension(
+ conformance_classes: List[str] = NOTHING,
+ default_includes: Set[str] = NOTHING,
+ schema_href: Union[str, NoneType] = None
+)
+
Fields Extension.
+The Fields extension adds functionality to the /search
endpoint which
+allows the caller to include or exclude specific from the API response.
+Registering this extension with the application has the added effect of
+removing the ItemCollection
response model from the /search
endpoint, as
+the Fields extension allows the API to return potentially invalid responses
+by excluding fields which are required by the STAC spec, such as geometry.
Name | +Type | +Description | +Default | +
---|---|---|---|
default_includes | +set | +defines the default set of included fields. | +None | +
conformance_classes | +list | +Defines the list of conformance classes for the extension |
+None | +
GET
+
POST
+
def get_request_model(
+ self,
+ verb: Union[str, NoneType] = 'GET'
+) -> Union[pydantic.main.BaseModel, NoneType]
+
Return the request model for the extension.method.
+The model can differ based on HTTP verb
+def register(
+ self,
+ app: fastapi.applications.FastAPI
+) -> None
+
Register the extension with a FastAPI application.
+Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
app | +fastapi.FastAPI | +target FastAPI application. | +None | +
Returns:
+Type | +Description | +
---|---|
None | +None | +
class FilterExtension(
+ schema_href: Union[str, NoneType] = None,
+ client: Union[stac_fastapi.types.core.AsyncBaseFiltersClient, stac_fastapi.types.core.BaseFiltersClient] = NOTHING,
+ conformance_classes: List[str] = [<FilterConformanceClasses.FILTER: 'http://www.opengis.net/spec/ogcapi-features-3/1.0/conf/filter'>, <FilterConformanceClasses.FEATURES_FILTER: 'http://www.opengis.net/spec/ogcapi-features-3/1.0/conf/features-filter'>, <FilterConformanceClasses.ITEM_SEARCH_FILTER: 'https://api.stacspec.org/v1.0.0-rc.2/item-search#filter'>, <FilterConformanceClasses.BASIC_CQL2: 'http://www.opengis.net/spec/cql2/1.0/conf/basic-cql2'>, <FilterConformanceClasses.CQL2_TEXT: 'http://www.opengis.net/spec/cql2/1.0/conf/cql2-text'>],
+ router: fastapi.routing.APIRouter = NOTHING,
+ response_class: Type[starlette.responses.Response] = <class 'stac_fastapi.api.models.JSONSchemaResponse'>
+)
+
Filter Extension.
+The filter extension adds several endpoints which allow the retrieval of +queryables and provides an expressive mechanism for searching based on Item
+Name | +Type | +Description | +Default | +
---|---|---|---|
client | +None | +Queryables endpoint logic | +None | +
conformance_classes | +None | +Conformance classes provided by the extension | +None | +
GET
+
POST
+
def get_request_model(
+ self,
+ verb: Union[str, NoneType] = 'GET'
+) -> Union[pydantic.main.BaseModel, NoneType]
+
Return the request model for the extension.method.
+The model can differ based on HTTP verb
+def register(
+ self,
+ app: fastapi.applications.FastAPI
+) -> None
+
Register the extension with a FastAPI application.
+Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
app | +None | +target FastAPI application. | +None | +
Returns:
+Type | +Description | +
---|---|
None | +None | +
class PaginationExtension(
+ conformance_classes: List[str] = NOTHING,
+ schema_href: Union[str, NoneType] = None
+)
+
Token Pagination.
+Though not strictly an extension, the chosen pagination will modify the form of the +request object. By making pagination an extension class, we can use +create_request_model to dynamically add the correct pagination parameter to the +request model for OpenAPI generation.
+GET
+
POST
+
def get_request_model(
+ self,
+ verb: Union[str, NoneType] = 'GET'
+) -> Union[pydantic.main.BaseModel, NoneType]
+
Return the request model for the extension.method.
+The model can differ based on HTTP verb
+def register(
+ self,
+ app: fastapi.applications.FastAPI
+) -> None
+
Register the extension with a FastAPI application.
+Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
app | +None | +target FastAPI application. | +None | +
Returns:
+Type | +Description | +
---|---|
None | +None | +
class QueryExtension(
+ conformance_classes: List[str] = NOTHING,
+ schema_href: Union[str, NoneType] = None
+)
+
Query Extension.
+The Query extension adds an additional query
parameter to /search
requests which
+allows the caller to perform queries against item metadata (ex. find all images with
+cloud cover less than 15%).
+github.com/radiantearth/stac-api-spec/blob/master/item-search/README.md#query
GET
+
POST
+
def get_request_model(
+ self,
+ verb: Union[str, NoneType] = 'GET'
+) -> Union[pydantic.main.BaseModel, NoneType]
+
Return the request model for the extension.method.
+The model can differ based on HTTP verb
+def register(
+ self,
+ app: fastapi.applications.FastAPI
+) -> None
+
Register the extension with a FastAPI application.
+Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
app | +None | +target FastAPI application. | +None | +
Returns:
+Type | +Description | +
---|---|
None | +None | +
class SortExtension(
+ conformance_classes: List[str] = NOTHING,
+ schema_href: Union[str, NoneType] = None
+)
+
Sort Extension.
+The Sort extension adds the sortby
parameter to the /search
endpoint, allowing the
+caller to specify the sort order of the returned items.
+stac-api-extensions/sort
GET
+
POST
+
def get_request_model(
+ self,
+ verb: Union[str, NoneType] = 'GET'
+) -> Union[pydantic.main.BaseModel, NoneType]
+
Return the request model for the extension.method.
+The model can differ based on HTTP verb
+def register(
+ self,
+ app: fastapi.applications.FastAPI
+) -> None
+
Register the extension with a FastAPI application.
+Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
app | +None | +target FastAPI application. | +None | +
Returns:
+Type | +Description | +
---|---|
None | +None | +
class TokenPaginationExtension(
+ conformance_classes: List[str] = NOTHING,
+ schema_href: Union[str, NoneType] = None
+)
+
Token Pagination.
+Though not strictly an extension, the chosen pagination will modify the form of the +request object. By making pagination an extension class, we can use +create_request_model to dynamically add the correct pagination parameter to the +request model for OpenAPI generation.
+GET
+
POST
+
def get_request_model(
+ self,
+ verb: Union[str, NoneType] = 'GET'
+) -> Union[pydantic.main.BaseModel, NoneType]
+
Return the request model for the extension.method.
+The model can differ based on HTTP verb
+def register(
+ self,
+ app: fastapi.applications.FastAPI
+) -> None
+
Register the extension with a FastAPI application.
+Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
app | +None | +target FastAPI application. | +None | +
Returns:
+Type | +Description | +
---|---|
None | +None | +
class TransactionExtension(
+ client: Union[stac_fastapi.types.core.AsyncBaseTransactionsClient, stac_fastapi.types.core.BaseTransactionsClient],
+ settings: stac_fastapi.types.config.ApiSettings,
+ conformance_classes: List[str] = NOTHING,
+ schema_href: Union[str, NoneType] = None,
+ router: fastapi.routing.APIRouter = NOTHING,
+ response_class: Type[starlette.responses.Response] = <class 'starlette.responses.JSONResponse'>
+)
+
Transaction Extension.
+The transaction extension adds several endpoints which allow the creation, +deletion, and updating of items and collections: + POST /collections + PUT /collections/{collection_id} + DELETE /collections/{collection_id} + POST /collections/{collection_id}/items + PUT /collections/{collection_id}/items + DELETE /collections/{collection_id}/items
+github.com/radiantearth/stac-api-spec/blob/master/ogcapi-features/extensions/transaction/README.md
+Name | +Type | +Description | +Default | +
---|---|---|---|
client | +None | +CRUD application logic | +None | +
GET
+
POST
+
def get_request_model(
+ self,
+ verb: Union[str, NoneType] = 'GET'
+) -> Union[pydantic.main.BaseModel, NoneType]
+
Return the request model for the extension.method.
+The model can differ based on HTTP verb
+def register(
+ self,
+ app: fastapi.applications.FastAPI
+) -> None
+
Register the extension with a FastAPI application.
+Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
app | +None | +target FastAPI application. | +None | +
Returns:
+Type | +Description | +
---|---|
None | +None | +
def register_create_collection(
+ self
+)
+
Register create collection endpoint (POST /collections).
+def register_create_item(
+ self
+)
+
Register create item endpoint (POST /collections/{collection_id}/items).
+def register_delete_collection(
+ self
+)
+
Register delete collection endpoint (DELETE /collections/{collection_id}).
+def register_delete_item(
+ self
+)
+
Register delete item endpoint (DELETE
+/collections/{collection_id}/items/{item_id}).
+def register_update_collection(
+ self
+)
+
Register update collection endpoint (PUT /collections).
+def register_update_item(
+ self
+)
+
Register update item endpoint (PUT
+/collections/{collection_id}/items/{item_id}).
+ + + + + + +Pagination classes as extensions.
+class PaginationExtension(
+ conformance_classes: List[str] = NOTHING,
+ schema_href: Union[str, NoneType] = None
+)
+
Token Pagination.
+Though not strictly an extension, the chosen pagination will modify the form of the +request object. By making pagination an extension class, we can use +create_request_model to dynamically add the correct pagination parameter to the +request model for OpenAPI generation.
+GET
+
POST
+
def get_request_model(
+ self,
+ verb: Union[str, NoneType] = 'GET'
+) -> Union[pydantic.main.BaseModel, NoneType]
+
Return the request model for the extension.method.
+The model can differ based on HTTP verb
+def register(
+ self,
+ app: fastapi.applications.FastAPI
+) -> None
+
Register the extension with a FastAPI application.
+Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
app | +None | +target FastAPI application. | +None | +
Returns:
+Type | +Description | +
---|---|
None | +None | +
class TokenPaginationExtension(
+ conformance_classes: List[str] = NOTHING,
+ schema_href: Union[str, NoneType] = None
+)
+
Token Pagination.
+Though not strictly an extension, the chosen pagination will modify the form of the +request object. By making pagination an extension class, we can use +create_request_model to dynamically add the correct pagination parameter to the +request model for OpenAPI generation.
+GET
+
POST
+
def get_request_model(
+ self,
+ verb: Union[str, NoneType] = 'GET'
+) -> Union[pydantic.main.BaseModel, NoneType]
+
Return the request model for the extension.method.
+The model can differ based on HTTP verb
+def register(
+ self,
+ app: fastapi.applications.FastAPI
+) -> None
+
Register the extension with a FastAPI application.
+Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
app | +None | +target FastAPI application. | +None | +
Returns:
+Type | +Description | +
---|---|
None | +None | +
Pagination API extension.
+class PaginationExtension(
+ conformance_classes: List[str] = NOTHING,
+ schema_href: Union[str, NoneType] = None
+)
+
Token Pagination.
+Though not strictly an extension, the chosen pagination will modify the form of the +request object. By making pagination an extension class, we can use +create_request_model to dynamically add the correct pagination parameter to the +request model for OpenAPI generation.
+GET
+
POST
+
def get_request_model(
+ self,
+ verb: Union[str, NoneType] = 'GET'
+) -> Union[pydantic.main.BaseModel, NoneType]
+
Return the request model for the extension.method.
+The model can differ based on HTTP verb
+def register(
+ self,
+ app: fastapi.applications.FastAPI
+) -> None
+
Register the extension with a FastAPI application.
+Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
app | +None | +target FastAPI application. | +None | +
Returns:
+Type | +Description | +
---|---|
None | +None | +
Token pagination API extension.
+class TokenPaginationExtension(
+ conformance_classes: List[str] = NOTHING,
+ schema_href: Union[str, NoneType] = None
+)
+
Token Pagination.
+Though not strictly an extension, the chosen pagination will modify the form of the +request object. By making pagination an extension class, we can use +create_request_model to dynamically add the correct pagination parameter to the +request model for OpenAPI generation.
+GET
+
POST
+
def get_request_model(
+ self,
+ verb: Union[str, NoneType] = 'GET'
+) -> Union[pydantic.main.BaseModel, NoneType]
+
Return the request model for the extension.method.
+The model can differ based on HTTP verb
+def register(
+ self,
+ app: fastapi.applications.FastAPI
+) -> None
+
Register the extension with a FastAPI application.
+Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
app | +None | +target FastAPI application. | +None | +
Returns:
+Type | +Description | +
---|---|
None | +None | +
Query extension module.
+class QueryExtension(
+ conformance_classes: List[str] = NOTHING,
+ schema_href: Union[str, NoneType] = None
+)
+
Query Extension.
+The Query extension adds an additional query
parameter to /search
requests which
+allows the caller to perform queries against item metadata (ex. find all images with
+cloud cover less than 15%).
+github.com/radiantearth/stac-api-spec/blob/master/item-search/README.md#query
GET
+
POST
+
def get_request_model(
+ self,
+ verb: Union[str, NoneType] = 'GET'
+) -> Union[pydantic.main.BaseModel, NoneType]
+
Return the request model for the extension.method.
+The model can differ based on HTTP verb
+def register(
+ self,
+ app: fastapi.applications.FastAPI
+) -> None
+
Register the extension with a FastAPI application.
+Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
app | +None | +target FastAPI application. | +None | +
Returns:
+Type | +Description | +
---|---|
None | +None | +
Query extension.
+class QueryExtension(
+ conformance_classes: List[str] = NOTHING,
+ schema_href: Union[str, NoneType] = None
+)
+
Query Extension.
+The Query extension adds an additional query
parameter to /search
requests which
+allows the caller to perform queries against item metadata (ex. find all images with
+cloud cover less than 15%).
+github.com/radiantearth/stac-api-spec/blob/master/item-search/README.md#query
GET
+
POST
+
def get_request_model(
+ self,
+ verb: Union[str, NoneType] = 'GET'
+) -> Union[pydantic.main.BaseModel, NoneType]
+
Return the request model for the extension.method.
+The model can differ based on HTTP verb
+def register(
+ self,
+ app: fastapi.applications.FastAPI
+) -> None
+
Register the extension with a FastAPI application.
+Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
app | +None | +target FastAPI application. | +None | +
Returns:
+Type | +Description | +
---|---|
None | +None | +
Request model for the Query extension.
+class QueryExtensionGetRequest(
+ query: Union[str, NoneType] = None
+)
+
Query Extension GET request model.
+def kwargs(
+ self
+) -> Dict
+
Transform api request params into format which matches the signature of the
+endpoint.
+class QueryExtensionPostRequest(
+ __pydantic_self__,
+ **data: Any
+)
+
Query Extension POST request model.
+Config
+
def construct(
+ _fields_set: Union[ForwardRef('SetStr'), NoneType] = None,
+ **values: Any
+) -> 'Model'
+
Creates a new model setting dict and fields_set from trusted or pre-validated data.
+Default values are respected, but no other validation is performed.
+Behaves as if Config.extra = 'allow'
was set since it adds all passed values
def from_orm(
+ obj: Any
+) -> 'Model'
+
def parse_file(
+ path: Union[str, pathlib.Path],
+ *,
+ content_type: 'unicode' = None,
+ encoding: 'unicode' = 'utf8',
+ proto: pydantic.parse.Protocol = None,
+ allow_pickle: bool = False
+) -> 'Model'
+
def parse_obj(
+ obj: Any
+) -> 'Model'
+
def parse_raw(
+ b: Union[str, bytes],
+ *,
+ content_type: 'unicode' = None,
+ encoding: 'unicode' = 'utf8',
+ proto: pydantic.parse.Protocol = None,
+ allow_pickle: bool = False
+) -> 'Model'
+
def schema(
+ by_alias: bool = True,
+ ref_template: 'unicode' = '#/definitions/{model}'
+) -> 'DictStrAny'
+
def schema_json(
+ *,
+ by_alias: bool = True,
+ ref_template: 'unicode' = '#/definitions/{model}',
+ **dumps_kwargs: Any
+) -> 'unicode'
+
def update_forward_refs(
+ **localns: Any
+) -> None
+
Try to update ForwardRefs on fields based on this Model, globalns and localns.
+def validate(
+ value: Any
+) -> 'Model'
+
def copy(
+ self: 'Model',
+ *,
+ include: Union[ForwardRef('AbstractSetIntStr'), ForwardRef('MappingIntStrAny'), NoneType] = None,
+ exclude: Union[ForwardRef('AbstractSetIntStr'), ForwardRef('MappingIntStrAny'), NoneType] = None,
+ update: Union[ForwardRef('DictStrAny'), NoneType] = None,
+ deep: bool = False
+) -> 'Model'
+
Duplicate a model, optionally choose which fields to include, exclude and change.
+Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
include | +None | +fields to include in new model | +None | +
exclude | +None | +fields to exclude from new model, as with values this takes precedence over include | +None | +
update | +None | +values to change/add in the new model. Note: the data is not validated before creating the new model: you should trust this data |
+None | +
deep | +None | +set to True to make a deep copy of the model |
+None | +
Returns:
+Type | +Description | +
---|---|
None | +new model instance | +
def dict(
+ self,
+ *,
+ include: Union[ForwardRef('AbstractSetIntStr'), ForwardRef('MappingIntStrAny'), NoneType] = None,
+ exclude: Union[ForwardRef('AbstractSetIntStr'), ForwardRef('MappingIntStrAny'), NoneType] = None,
+ by_alias: bool = False,
+ skip_defaults: Union[bool, NoneType] = None,
+ exclude_unset: bool = False,
+ exclude_defaults: bool = False,
+ exclude_none: bool = False
+) -> 'DictStrAny'
+
Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.
+def json(
+ self,
+ *,
+ include: Union[ForwardRef('AbstractSetIntStr'), ForwardRef('MappingIntStrAny'), NoneType] = None,
+ exclude: Union[ForwardRef('AbstractSetIntStr'), ForwardRef('MappingIntStrAny'), NoneType] = None,
+ by_alias: bool = False,
+ skip_defaults: Union[bool, NoneType] = None,
+ exclude_unset: bool = False,
+ exclude_defaults: bool = False,
+ exclude_none: bool = False,
+ encoder: Union[Callable[[Any], Any], NoneType] = None,
+ models_as_dict: bool = True,
+ **dumps_kwargs: Any
+) -> 'unicode'
+
Generate a JSON representation of the model, include
and exclude
arguments as per dict()
.
encoder
is an optional function to supply as default
to json.dumps(), other arguments as per json.dumps()
.
Sort extension module.
+class SortExtension(
+ conformance_classes: List[str] = NOTHING,
+ schema_href: Union[str, NoneType] = None
+)
+
Sort Extension.
+The Sort extension adds the sortby
parameter to the /search
endpoint, allowing the
+caller to specify the sort order of the returned items.
+stac-api-extensions/sort
GET
+
POST
+
def get_request_model(
+ self,
+ verb: Union[str, NoneType] = 'GET'
+) -> Union[pydantic.main.BaseModel, NoneType]
+
Return the request model for the extension.method.
+The model can differ based on HTTP verb
+def register(
+ self,
+ app: fastapi.applications.FastAPI
+) -> None
+
Register the extension with a FastAPI application.
+Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
app | +None | +target FastAPI application. | +None | +
Returns:
+Type | +Description | +
---|---|
None | +None | +
Request model for the Sort Extension.
+class SortExtensionGetRequest(
+ sortby: str = None
+)
+
Sortby Parameter for GET requests.
+def kwargs(
+ self
+) -> Dict
+
Transform api request params into format which matches the signature of the
+endpoint.
+class SortExtensionPostRequest(
+ __pydantic_self__,
+ **data: Any
+)
+
Sortby parameter for POST requests.
+Config
+
def construct(
+ _fields_set: Union[ForwardRef('SetStr'), NoneType] = None,
+ **values: Any
+) -> 'Model'
+
Creates a new model setting dict and fields_set from trusted or pre-validated data.
+Default values are respected, but no other validation is performed.
+Behaves as if Config.extra = 'allow'
was set since it adds all passed values
def from_orm(
+ obj: Any
+) -> 'Model'
+
def parse_file(
+ path: Union[str, pathlib.Path],
+ *,
+ content_type: 'unicode' = None,
+ encoding: 'unicode' = 'utf8',
+ proto: pydantic.parse.Protocol = None,
+ allow_pickle: bool = False
+) -> 'Model'
+
def parse_obj(
+ obj: Any
+) -> 'Model'
+
def parse_raw(
+ b: Union[str, bytes],
+ *,
+ content_type: 'unicode' = None,
+ encoding: 'unicode' = 'utf8',
+ proto: pydantic.parse.Protocol = None,
+ allow_pickle: bool = False
+) -> 'Model'
+
def schema(
+ by_alias: bool = True,
+ ref_template: 'unicode' = '#/definitions/{model}'
+) -> 'DictStrAny'
+
def schema_json(
+ *,
+ by_alias: bool = True,
+ ref_template: 'unicode' = '#/definitions/{model}',
+ **dumps_kwargs: Any
+) -> 'unicode'
+
def update_forward_refs(
+ **localns: Any
+) -> None
+
Try to update ForwardRefs on fields based on this Model, globalns and localns.
+def validate(
+ value: Any
+) -> 'Model'
+
def copy(
+ self: 'Model',
+ *,
+ include: Union[ForwardRef('AbstractSetIntStr'), ForwardRef('MappingIntStrAny'), NoneType] = None,
+ exclude: Union[ForwardRef('AbstractSetIntStr'), ForwardRef('MappingIntStrAny'), NoneType] = None,
+ update: Union[ForwardRef('DictStrAny'), NoneType] = None,
+ deep: bool = False
+) -> 'Model'
+
Duplicate a model, optionally choose which fields to include, exclude and change.
+Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
include | +None | +fields to include in new model | +None | +
exclude | +None | +fields to exclude from new model, as with values this takes precedence over include | +None | +
update | +None | +values to change/add in the new model. Note: the data is not validated before creating the new model: you should trust this data |
+None | +
deep | +None | +set to True to make a deep copy of the model |
+None | +
Returns:
+Type | +Description | +
---|---|
None | +new model instance | +
def dict(
+ self,
+ *,
+ include: Union[ForwardRef('AbstractSetIntStr'), ForwardRef('MappingIntStrAny'), NoneType] = None,
+ exclude: Union[ForwardRef('AbstractSetIntStr'), ForwardRef('MappingIntStrAny'), NoneType] = None,
+ by_alias: bool = False,
+ skip_defaults: Union[bool, NoneType] = None,
+ exclude_unset: bool = False,
+ exclude_defaults: bool = False,
+ exclude_none: bool = False
+) -> 'DictStrAny'
+
Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.
+def json(
+ self,
+ *,
+ include: Union[ForwardRef('AbstractSetIntStr'), ForwardRef('MappingIntStrAny'), NoneType] = None,
+ exclude: Union[ForwardRef('AbstractSetIntStr'), ForwardRef('MappingIntStrAny'), NoneType] = None,
+ by_alias: bool = False,
+ skip_defaults: Union[bool, NoneType] = None,
+ exclude_unset: bool = False,
+ exclude_defaults: bool = False,
+ exclude_none: bool = False,
+ encoder: Union[Callable[[Any], Any], NoneType] = None,
+ models_as_dict: bool = True,
+ **dumps_kwargs: Any
+) -> 'unicode'
+
Generate a JSON representation of the model, include
and exclude
arguments as per dict()
.
encoder
is an optional function to supply as default
to json.dumps(), other arguments as per json.dumps()
.
Sort extension.
+class SortExtension(
+ conformance_classes: List[str] = NOTHING,
+ schema_href: Union[str, NoneType] = None
+)
+
Sort Extension.
+The Sort extension adds the sortby
parameter to the /search
endpoint, allowing the
+caller to specify the sort order of the returned items.
+stac-api-extensions/sort
GET
+
POST
+
def get_request_model(
+ self,
+ verb: Union[str, NoneType] = 'GET'
+) -> Union[pydantic.main.BaseModel, NoneType]
+
Return the request model for the extension.method.
+The model can differ based on HTTP verb
+def register(
+ self,
+ app: fastapi.applications.FastAPI
+) -> None
+
Register the extension with a FastAPI application.
+Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
app | +None | +target FastAPI application. | +None | +
Returns:
+Type | +Description | +
---|---|
None | +None | +
Transaction extension.
+class PostItem(
+ collection_id: str = Path(Ellipsis),
+ item: Union[stac_fastapi.types.stac.Item, stac_fastapi.types.stac.ItemCollection] = Body(None)
+)
+
Create Item.
+def kwargs(
+ self
+) -> Dict
+
Transform api request params into format which matches the signature of the
+endpoint.
+class PutItem(
+ collection_id: str = Path(Ellipsis),
+ item_id: str = Path(Ellipsis),
+ item: stac_fastapi.types.stac.Item = Body(None)
+)
+
Update Item.
+def kwargs(
+ self
+) -> Dict
+
Transform api request params into format which matches the signature of the
+endpoint.
+class TransactionExtension(
+ client: Union[stac_fastapi.types.core.AsyncBaseTransactionsClient, stac_fastapi.types.core.BaseTransactionsClient],
+ settings: stac_fastapi.types.config.ApiSettings,
+ conformance_classes: List[str] = NOTHING,
+ schema_href: Union[str, NoneType] = None,
+ router: fastapi.routing.APIRouter = NOTHING,
+ response_class: Type[starlette.responses.Response] = <class 'starlette.responses.JSONResponse'>
+)
+
Transaction Extension.
+The transaction extension adds several endpoints which allow the creation, +deletion, and updating of items and collections: + POST /collections + PUT /collections/{collection_id} + DELETE /collections/{collection_id} + POST /collections/{collection_id}/items + PUT /collections/{collection_id}/items + DELETE /collections/{collection_id}/items
+github.com/radiantearth/stac-api-spec/blob/master/ogcapi-features/extensions/transaction/README.md
+Name | +Type | +Description | +Default | +
---|---|---|---|
client | +None | +CRUD application logic | +None | +
GET
+
POST
+
def get_request_model(
+ self,
+ verb: Union[str, NoneType] = 'GET'
+) -> Union[pydantic.main.BaseModel, NoneType]
+
Return the request model for the extension.method.
+The model can differ based on HTTP verb
+def register(
+ self,
+ app: fastapi.applications.FastAPI
+) -> None
+
Register the extension with a FastAPI application.
+Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
app | +None | +target FastAPI application. | +None | +
Returns:
+Type | +Description | +
---|---|
None | +None | +
def register_create_collection(
+ self
+)
+
Register create collection endpoint (POST /collections).
+def register_create_item(
+ self
+)
+
Register create item endpoint (POST /collections/{collection_id}/items).
+def register_delete_collection(
+ self
+)
+
Register delete collection endpoint (DELETE /collections/{collection_id}).
+def register_delete_item(
+ self
+)
+
Register delete item endpoint (DELETE
+/collections/{collection_id}/items/{item_id}).
+def register_update_collection(
+ self
+)
+
Register update collection endpoint (PUT /collections).
+def register_update_item(
+ self
+)
+
Register update item endpoint (PUT
+/collections/{collection_id}/items/{item_id}).
+ + + + + + +Bulk transactions extension.
+class AsyncBaseBulkTransactionsClient(
+
+)
+
BulkTransactionsClient.
+def bulk_item_insert(
+ self,
+ items: stac_fastapi.extensions.third_party.bulk_transactions.Items,
+ **kwargs
+) -> str
+
Bulk creation of items.
+Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
items | +None | +list of items. | +None | +
Returns:
+Type | +Description | +
---|---|
None | +Message indicating the status of the insert. | +
class BaseBulkTransactionsClient(
+
+)
+
BulkTransactionsClient.
+def bulk_item_insert(
+ self,
+ items: stac_fastapi.extensions.third_party.bulk_transactions.Items,
+ chunk_size: Union[int, NoneType] = None,
+ **kwargs
+) -> str
+
Bulk creation of items.
+Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
items | +None | +list of items. | +None | +
chunk_size | +None | +number of items processed at a time. | +None | +
Returns:
+Type | +Description | +
---|---|
None | +Message indicating the status of the insert. | +
class BulkTransactionExtension(
+ client: Union[stac_fastapi.extensions.third_party.bulk_transactions.AsyncBaseBulkTransactionsClient, stac_fastapi.extensions.third_party.bulk_transactions.BaseBulkTransactionsClient],
+ conformance_classes: List[str] = [],
+ schema_href: Union[str, NoneType] = None
+)
+
Bulk Transaction Extension.
+Bulk Transaction extension adds the POST
+/collections/{collection_id}/bulk_items
endpoint to the application for
+efficient bulk insertion of items. The input to this is an object with an
+attribute "items", that has a value that is an object with a group of
+attributes that are the ids of each Item, and the value is the Item entity.
{
+"items": {
+ "id1": { "type": "Feature", ... },
+ "id2": { "type": "Feature", ... },
+ "id3": { "type": "Feature", ... }
+}
+
GET
+
POST
+
def get_request_model(
+ self,
+ verb: Union[str, NoneType] = 'GET'
+) -> Union[pydantic.main.BaseModel, NoneType]
+
Return the request model for the extension.method.
+The model can differ based on HTTP verb
+def register(
+ self,
+ app: fastapi.applications.FastAPI
+) -> None
+
Register the extension with a FastAPI application.
+Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
app | +None | +target FastAPI application. | +None | +
Returns:
+Type | +Description | +
---|---|
None | +None | +
class Items(
+ __pydantic_self__,
+ **data: Any
+)
+
A group of STAC Item objects, in the form of a dictionary from Item.id -> Item.
+Config
+
def construct(
+ _fields_set: Union[ForwardRef('SetStr'), NoneType] = None,
+ **values: Any
+) -> 'Model'
+
Creates a new model setting dict and fields_set from trusted or pre-validated data.
+Default values are respected, but no other validation is performed.
+Behaves as if Config.extra = 'allow'
was set since it adds all passed values
def from_orm(
+ obj: Any
+) -> 'Model'
+
def parse_file(
+ path: Union[str, pathlib.Path],
+ *,
+ content_type: 'unicode' = None,
+ encoding: 'unicode' = 'utf8',
+ proto: pydantic.parse.Protocol = None,
+ allow_pickle: bool = False
+) -> 'Model'
+
def parse_obj(
+ obj: Any
+) -> 'Model'
+
def parse_raw(
+ b: Union[str, bytes],
+ *,
+ content_type: 'unicode' = None,
+ encoding: 'unicode' = 'utf8',
+ proto: pydantic.parse.Protocol = None,
+ allow_pickle: bool = False
+) -> 'Model'
+
def schema(
+ by_alias: bool = True,
+ ref_template: 'unicode' = '#/definitions/{model}'
+) -> 'DictStrAny'
+
def schema_json(
+ *,
+ by_alias: bool = True,
+ ref_template: 'unicode' = '#/definitions/{model}',
+ **dumps_kwargs: Any
+) -> 'unicode'
+
def update_forward_refs(
+ **localns: Any
+) -> None
+
Try to update ForwardRefs on fields based on this Model, globalns and localns.
+def validate(
+ value: Any
+) -> 'Model'
+
def copy(
+ self: 'Model',
+ *,
+ include: Union[ForwardRef('AbstractSetIntStr'), ForwardRef('MappingIntStrAny'), NoneType] = None,
+ exclude: Union[ForwardRef('AbstractSetIntStr'), ForwardRef('MappingIntStrAny'), NoneType] = None,
+ update: Union[ForwardRef('DictStrAny'), NoneType] = None,
+ deep: bool = False
+) -> 'Model'
+
Duplicate a model, optionally choose which fields to include, exclude and change.
+Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
include | +None | +fields to include in new model | +None | +
exclude | +None | +fields to exclude from new model, as with values this takes precedence over include | +None | +
update | +None | +values to change/add in the new model. Note: the data is not validated before creating the new model: you should trust this data |
+None | +
deep | +None | +set to True to make a deep copy of the model |
+None | +
Returns:
+Type | +Description | +
---|---|
None | +new model instance | +
def dict(
+ self,
+ *,
+ include: Union[ForwardRef('AbstractSetIntStr'), ForwardRef('MappingIntStrAny'), NoneType] = None,
+ exclude: Union[ForwardRef('AbstractSetIntStr'), ForwardRef('MappingIntStrAny'), NoneType] = None,
+ by_alias: bool = False,
+ skip_defaults: Union[bool, NoneType] = None,
+ exclude_unset: bool = False,
+ exclude_defaults: bool = False,
+ exclude_none: bool = False
+) -> 'DictStrAny'
+
Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.
+def json(
+ self,
+ *,
+ include: Union[ForwardRef('AbstractSetIntStr'), ForwardRef('MappingIntStrAny'), NoneType] = None,
+ exclude: Union[ForwardRef('AbstractSetIntStr'), ForwardRef('MappingIntStrAny'), NoneType] = None,
+ by_alias: bool = False,
+ skip_defaults: Union[bool, NoneType] = None,
+ exclude_unset: bool = False,
+ exclude_defaults: bool = False,
+ exclude_none: bool = False,
+ encoder: Union[Callable[[Any], Any], NoneType] = None,
+ models_as_dict: bool = True,
+ **dumps_kwargs: Any
+) -> 'unicode'
+
Generate a JSON representation of the model, include
and exclude
arguments as per dict()
.
encoder
is an optional function to supply as default
to json.dumps(), other arguments as per json.dumps()
.
stac_api.extensions.third_party module.
+class BulkTransactionExtension(
+ client: Union[stac_fastapi.extensions.third_party.bulk_transactions.AsyncBaseBulkTransactionsClient, stac_fastapi.extensions.third_party.bulk_transactions.BaseBulkTransactionsClient],
+ conformance_classes: List[str] = [],
+ schema_href: Union[str, NoneType] = None
+)
+
Bulk Transaction Extension.
+Bulk Transaction extension adds the POST
+/collections/{collection_id}/bulk_items
endpoint to the application for
+efficient bulk insertion of items. The input to this is an object with an
+attribute "items", that has a value that is an object with a group of
+attributes that are the ids of each Item, and the value is the Item entity.
{
+"items": {
+ "id1": { "type": "Feature", ... },
+ "id2": { "type": "Feature", ... },
+ "id3": { "type": "Feature", ... }
+}
+
GET
+
POST
+
def get_request_model(
+ self,
+ verb: Union[str, NoneType] = 'GET'
+) -> Union[pydantic.main.BaseModel, NoneType]
+
Return the request model for the extension.method.
+The model can differ based on HTTP verb
+def register(
+ self,
+ app: fastapi.applications.FastAPI
+) -> None
+
Register the extension with a FastAPI application.
+Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
app | +None | +target FastAPI application. | +None | +
Returns:
+Type | +Description | +
---|---|
None | +None | +
Library version.
+ + + + + + +stac_fastapi.types.config module.
+class ApiSettings(
+ __pydantic_self__,
+ _env_file: Union[str, os.PathLike, List[Union[str, os.PathLike]], Tuple[Union[str, os.PathLike], ...], NoneType] = '<object object at 0x7f5ec708ac60>',
+ _env_file_encoding: Union[str, NoneType] = None,
+ _env_nested_delimiter: Union[str, NoneType] = None,
+ _secrets_dir: Union[str, os.PathLike, NoneType] = None,
+ **values: Any
+)
+
ApiSettings.
+Defines api configuration, potentially through environment variables. +See pydantic-docs.helpmanual.io/usage/settings/.
+Name | +Type | +Description | +Default | +
---|---|---|---|
environment | +None | +name of the environment (ex. dev/prod). | +None | +
debug | +None | +toggles debug mode. | +None | +
forbidden_fields | +None | +set of fields defined by STAC but not included in the database. | +None | +
indexed_fields | +None | +set of fields which are usually in item.properties but are indexedas distinct columns in the database. |
+None | +
Config
+
def construct(
+ _fields_set: Union[ForwardRef('SetStr'), NoneType] = None,
+ **values: Any
+) -> 'Model'
+
Creates a new model setting dict and fields_set from trusted or pre-validated data.
+Default values are respected, but no other validation is performed.
+Behaves as if Config.extra = 'allow'
was set since it adds all passed values
def from_orm(
+ obj: Any
+) -> 'Model'
+
def parse_file(
+ path: Union[str, pathlib.Path],
+ *,
+ content_type: 'unicode' = None,
+ encoding: 'unicode' = 'utf8',
+ proto: pydantic.parse.Protocol = None,
+ allow_pickle: bool = False
+) -> 'Model'
+
def parse_obj(
+ obj: Any
+) -> 'Model'
+
def parse_raw(
+ b: Union[str, bytes],
+ *,
+ content_type: 'unicode' = None,
+ encoding: 'unicode' = 'utf8',
+ proto: pydantic.parse.Protocol = None,
+ allow_pickle: bool = False
+) -> 'Model'
+
def schema(
+ by_alias: bool = True,
+ ref_template: 'unicode' = '#/definitions/{model}'
+) -> 'DictStrAny'
+
def schema_json(
+ *,
+ by_alias: bool = True,
+ ref_template: 'unicode' = '#/definitions/{model}',
+ **dumps_kwargs: Any
+) -> 'unicode'
+
def update_forward_refs(
+ **localns: Any
+) -> None
+
Try to update ForwardRefs on fields based on this Model, globalns and localns.
+def validate(
+ value: Any
+) -> 'Model'
+
def copy(
+ self: 'Model',
+ *,
+ include: Union[ForwardRef('AbstractSetIntStr'), ForwardRef('MappingIntStrAny'), NoneType] = None,
+ exclude: Union[ForwardRef('AbstractSetIntStr'), ForwardRef('MappingIntStrAny'), NoneType] = None,
+ update: Union[ForwardRef('DictStrAny'), NoneType] = None,
+ deep: bool = False
+) -> 'Model'
+
Duplicate a model, optionally choose which fields to include, exclude and change.
+Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
include | +None | +fields to include in new model | +None | +
exclude | +None | +fields to exclude from new model, as with values this takes precedence over include | +None | +
update | +None | +values to change/add in the new model. Note: the data is not validated before creating the new model: you should trust this data |
+None | +
deep | +None | +set to True to make a deep copy of the model |
+None | +
Returns:
+Type | +Description | +
---|---|
None | +new model instance | +
def dict(
+ self,
+ *,
+ include: Union[ForwardRef('AbstractSetIntStr'), ForwardRef('MappingIntStrAny'), NoneType] = None,
+ exclude: Union[ForwardRef('AbstractSetIntStr'), ForwardRef('MappingIntStrAny'), NoneType] = None,
+ by_alias: bool = False,
+ skip_defaults: Union[bool, NoneType] = None,
+ exclude_unset: bool = False,
+ exclude_defaults: bool = False,
+ exclude_none: bool = False
+) -> 'DictStrAny'
+
Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.
+def json(
+ self,
+ *,
+ include: Union[ForwardRef('AbstractSetIntStr'), ForwardRef('MappingIntStrAny'), NoneType] = None,
+ exclude: Union[ForwardRef('AbstractSetIntStr'), ForwardRef('MappingIntStrAny'), NoneType] = None,
+ by_alias: bool = False,
+ skip_defaults: Union[bool, NoneType] = None,
+ exclude_unset: bool = False,
+ exclude_defaults: bool = False,
+ exclude_none: bool = False,
+ encoder: Union[Callable[[Any], Any], NoneType] = None,
+ models_as_dict: bool = True,
+ **dumps_kwargs: Any
+) -> 'unicode'
+
Generate a JSON representation of the model, include
and exclude
arguments as per dict()
.
encoder
is an optional function to supply as default
to json.dumps(), other arguments as per json.dumps()
.
class Settings(
+ /,
+ *args,
+ **kwargs
+)
+
Holds the global instance of settings.
+def get(
+
+) -> stac_fastapi.types.config.ApiSettings
+
Get the settings.
+If they have not yet been set, throws an exception.
+def set(
+ base_settings: stac_fastapi.types.config.ApiSettings
+)
+
Set the global settings.
+ + + + + + +Conformance Classes.
+BASE_CONFORMANCE_CLASSES
+
class OAFConformanceClasses(
+ /,
+ *args,
+ **kwargs
+)
+
Conformance classes for OGC API - Features.
+CORE
+
GEOJSON
+
OPEN_API
+
name
+
value
+
class STACConformanceClasses(
+ /,
+ *args,
+ **kwargs
+)
+
Conformance classes for the STAC API spec.
+COLLECTIONS
+
CORE
+
ITEM_SEARCH
+
OGC_API_FEAT
+
name
+
value
+
Base clients.
+BASE_CONFORMANCE_CLASSES
+
NumType
+
STAC_VERSION
+
StacType
+
class AsyncBaseCoreClient(
+ stac_version: str = '1.0.0',
+ landing_page_id: str = 'stac-fastapi',
+ title: str = 'stac-fastapi',
+ description: str = 'stac-fastapi',
+ base_conformance_classes: List[str] = NOTHING,
+ extensions: List[stac_fastapi.types.extension.ApiExtension] = NOTHING,
+ post_request_model=<class 'stac_fastapi.types.search.BaseSearchPostRequest'>
+)
+
Defines a pattern for implementing STAC api core endpoints.
+Name | +Type | +Description | +Default | +
---|---|---|---|
extensions | +None | +list of registered api extensions. | +None | +
post_request_model
+
def all_collections(
+ self,
+ **kwargs
+) -> stac_fastapi.types.stac.Collections
+
Get all available collections.
+Called with GET /collections
.
Returns:
+Type | +Description | +
---|---|
None | +A list of collections. | +
def conformance(
+ self,
+ **kwargs
+) -> stac_fastapi.types.stac.Conformance
+
Conformance classes.
+Called with GET /conformance
.
Returns:
+Type | +Description | +
---|---|
None | +Conformance classes which the server conforms to. | +
def conformance_classes(
+ self
+) -> List[str]
+
Generate conformance classes by adding extension conformance to base
+conformance classes.
+def extension_is_enabled(
+ self,
+ extension: str
+) -> bool
+
Check if an api extension is enabled.
+def get_collection(
+ self,
+ collection_id: str,
+ **kwargs
+) -> stac_fastapi.types.stac.Collection
+
Get collection by id.
+Called with GET /collections/{collection_id}
.
Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
collection_id | +None | +Id of the collection. | +None | +
Returns:
+Type | +Description | +
---|---|
None | +Collection. | +
def get_item(
+ self,
+ item_id: str,
+ collection_id: str,
+ **kwargs
+) -> stac_fastapi.types.stac.Item
+
Get item by id.
+Called with GET /collections/{collection_id}/items/{item_id}
.
Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
item_id | +None | +Id of the item. | +None | +
collection_id | +None | +Id of the collection. | +None | +
Returns:
+Type | +Description | +
---|---|
None | +Item. | +
def get_search(
+ self,
+ collections: Union[List[str], NoneType] = None,
+ ids: Union[List[str], NoneType] = None,
+ bbox: Union[List[Union[float, int]], NoneType] = None,
+ datetime: Union[str, datetime.datetime, NoneType] = None,
+ limit: Union[int, NoneType] = 10,
+ query: Union[str, NoneType] = None,
+ token: Union[str, NoneType] = None,
+ fields: Union[List[str], NoneType] = None,
+ sortby: Union[str, NoneType] = None,
+ intersects: Union[str, NoneType] = None,
+ **kwargs
+) -> stac_fastapi.types.stac.ItemCollection
+
Cross catalog search (GET).
+Called with GET /search
.
Returns:
+Type | +Description | +
---|---|
None | +ItemCollection containing items which match the search criteria. | +
def item_collection(
+ self,
+ collection_id: str,
+ bbox: Union[List[Union[float, int]], NoneType] = None,
+ datetime: Union[str, datetime.datetime, NoneType] = None,
+ limit: int = 10,
+ token: str = None,
+ **kwargs
+) -> stac_fastapi.types.stac.ItemCollection
+
Get all items from a specific collection.
+Called with GET /collections/{collection_id}/items
Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
collection_id | +None | +id of the collection. | +None | +
limit | +None | +number of items to return. | +None | +
token | +None | +pagination token. | +None | +
Returns:
+Type | +Description | +
---|---|
None | +An ItemCollection. | +
def landing_page(
+ self,
+ **kwargs
+) -> stac_fastapi.types.stac.LandingPage
+
Landing page.
+Called with GET /
.
Returns:
+Type | +Description | +
---|---|
None | +API landing page, serving as an entry point to the API. | +
def post_search(
+ self,
+ search_request: stac_fastapi.types.search.BaseSearchPostRequest,
+ **kwargs
+) -> stac_fastapi.types.stac.ItemCollection
+
Cross catalog search (POST).
+Called with POST /search
.
Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
search_request | +None | +search request parameters. | +None | +
Returns:
+Type | +Description | +
---|---|
None | +ItemCollection containing items which match the search criteria. | +
class AsyncBaseFiltersClient(
+
+)
+
Defines a pattern for implementing the STAC filter extension.
+def get_queryables(
+ self,
+ collection_id: Union[str, NoneType] = None,
+ **kwargs
+) -> Dict[str, Any]
+
Get the queryables available for the given collection_id.
+If collection_id is None, returns the intersection of all queryables over all +collections.
+This base implementation returns a blank queryable schema. This is not allowed +under OGC CQL but it is allowed by the STAC API Filter Extension +github.com/radiantearth/stac-api-spec/tree/master/fragments/filter#queryables
+class AsyncBaseTransactionsClient(
+
+)
+
Defines a pattern for implementing the STAC transaction extension.
+def create_collection(
+ self,
+ collection: stac_fastapi.types.stac.Collection,
+ **kwargs
+) -> Union[stac_fastapi.types.stac.Collection, starlette.responses.Response, NoneType]
+
Create a new collection.
+Called with POST /collections
.
Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
collection | +None | +the collection | +None | +
Returns:
+Type | +Description | +
---|---|
None | +The collection that was created. | +
def create_item(
+ self,
+ collection_id: str,
+ item: Union[stac_fastapi.types.stac.Item, stac_fastapi.types.stac.ItemCollection],
+ **kwargs
+) -> Union[stac_fastapi.types.stac.Item, starlette.responses.Response, NoneType]
+
Create a new item.
+Called with POST /collections/{collection_id}/items
.
Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
item | +None | +the item or item collection | +None | +
collection_id | +None | +the id of the collection from the resource path | +None | +
Returns:
+Type | +Description | +
---|---|
None | +The item that was created or None if item collection. | +
def delete_collection(
+ self,
+ collection_id: str,
+ **kwargs
+) -> Union[stac_fastapi.types.stac.Collection, starlette.responses.Response, NoneType]
+
Delete a collection.
+Called with DELETE /collections/{collection_id}
Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
collection_id | +None | +id of the collection. | +None | +
Returns:
+Type | +Description | +
---|---|
None | +The deleted collection. | +
def delete_item(
+ self,
+ item_id: str,
+ collection_id: str,
+ **kwargs
+) -> Union[stac_fastapi.types.stac.Item, starlette.responses.Response, NoneType]
+
Delete an item from a collection.
+Called with DELETE /collections/{collection_id}/items/{item_id}
Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
item_id | +None | +id of the item. | +None | +
collection_id | +None | +id of the collection. | +None | +
Returns:
+Type | +Description | +
---|---|
None | +The deleted item. | +
def update_collection(
+ self,
+ collection: stac_fastapi.types.stac.Collection,
+ **kwargs
+) -> Union[stac_fastapi.types.stac.Collection, starlette.responses.Response, NoneType]
+
Perform a complete update on an existing collection.
+Called with PUT /collections
. It is expected that this item already
+exists. The update should do a diff against the saved collection and
+perform any necessary updates. Partial updates are not supported by the
+transactions extension.
Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
collection | +None | +the collection (must be complete) | +None | +
Returns:
+Type | +Description | +
---|---|
None | +The updated collection. | +
def update_item(
+ self,
+ collection_id: str,
+ item_id: str,
+ item: stac_fastapi.types.stac.Item,
+ **kwargs
+) -> Union[stac_fastapi.types.stac.Item, starlette.responses.Response, NoneType]
+
Perform a complete update on an existing item.
+Called with PUT /collections/{collection_id}/items
. It is expected
+that this item already exists. The update should do a diff against the
+saved item and perform any necessary updates. Partial updates are not
+supported by the transactions extension.
Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
item | +None | +the item (must be complete) | +None | +
Returns:
+Type | +Description | +
---|---|
None | +The updated item. | +
class BaseCoreClient(
+ stac_version: str = '1.0.0',
+ landing_page_id: str = 'stac-fastapi',
+ title: str = 'stac-fastapi',
+ description: str = 'stac-fastapi',
+ base_conformance_classes: List[str] = NOTHING,
+ extensions: List[stac_fastapi.types.extension.ApiExtension] = NOTHING,
+ post_request_model=<class 'stac_fastapi.types.search.BaseSearchPostRequest'>
+)
+
Defines a pattern for implementing STAC api core endpoints.
+Name | +Type | +Description | +Default | +
---|---|---|---|
extensions | +None | +list of registered api extensions. | +None | +
post_request_model
+
def all_collections(
+ self,
+ **kwargs
+) -> stac_fastapi.types.stac.Collections
+
Get all available collections.
+Called with GET /collections
.
Returns:
+Type | +Description | +
---|---|
None | +A list of collections. | +
def conformance(
+ self,
+ **kwargs
+) -> stac_fastapi.types.stac.Conformance
+
Conformance classes.
+Called with GET /conformance
.
Returns:
+Type | +Description | +
---|---|
None | +Conformance classes which the server conforms to. | +
def conformance_classes(
+ self
+) -> List[str]
+
Generate conformance classes by adding extension conformance to base
+conformance classes.
+def extension_is_enabled(
+ self,
+ extension: str
+) -> bool
+
Check if an api extension is enabled.
+def get_collection(
+ self,
+ collection_id: str,
+ **kwargs
+) -> stac_fastapi.types.stac.Collection
+
Get collection by id.
+Called with GET /collections/{collection_id}
.
Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
collection_id | +None | +Id of the collection. | +None | +
Returns:
+Type | +Description | +
---|---|
None | +Collection. | +
def get_item(
+ self,
+ item_id: str,
+ collection_id: str,
+ **kwargs
+) -> stac_fastapi.types.stac.Item
+
Get item by id.
+Called with GET /collections/{collection_id}/items/{item_id}
.
Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
item_id | +None | +Id of the item. | +None | +
collection_id | +None | +Id of the collection. | +None | +
Returns:
+Type | +Description | +
---|---|
None | +Item. | +
def get_search(
+ self,
+ collections: Union[List[str], NoneType] = None,
+ ids: Union[List[str], NoneType] = None,
+ bbox: Union[List[Union[float, int]], NoneType] = None,
+ datetime: Union[str, datetime.datetime, NoneType] = None,
+ limit: Union[int, NoneType] = 10,
+ query: Union[str, NoneType] = None,
+ token: Union[str, NoneType] = None,
+ fields: Union[List[str], NoneType] = None,
+ sortby: Union[str, NoneType] = None,
+ intersects: Union[str, NoneType] = None,
+ **kwargs
+) -> stac_fastapi.types.stac.ItemCollection
+
Cross catalog search (GET).
+Called with GET /search
.
Returns:
+Type | +Description | +
---|---|
None | +ItemCollection containing items which match the search criteria. | +
def item_collection(
+ self,
+ collection_id: str,
+ bbox: Union[List[Union[float, int]], NoneType] = None,
+ datetime: Union[str, datetime.datetime, NoneType] = None,
+ limit: int = 10,
+ token: str = None,
+ **kwargs
+) -> stac_fastapi.types.stac.ItemCollection
+
Get all items from a specific collection.
+Called with GET /collections/{collection_id}/items
Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
collection_id | +None | +id of the collection. | +None | +
limit | +None | +number of items to return. | +None | +
token | +None | +pagination token. | +None | +
Returns:
+Type | +Description | +
---|---|
None | +An ItemCollection. | +
def landing_page(
+ self,
+ **kwargs
+) -> stac_fastapi.types.stac.LandingPage
+
Landing page.
+Called with GET /
.
Returns:
+Type | +Description | +
---|---|
None | +API landing page, serving as an entry point to the API. | +
def list_conformance_classes(
+ self
+)
+
Return a list of conformance classes, including implemented extensions.
+def post_search(
+ self,
+ search_request: stac_fastapi.types.search.BaseSearchPostRequest,
+ **kwargs
+) -> stac_fastapi.types.stac.ItemCollection
+
Cross catalog search (POST).
+Called with POST /search
.
Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
search_request | +None | +search request parameters. | +None | +
Returns:
+Type | +Description | +
---|---|
None | +ItemCollection containing items which match the search criteria. | +
class BaseFiltersClient(
+
+)
+
Defines a pattern for implementing the STAC filter extension.
+def get_queryables(
+ self,
+ collection_id: Union[str, NoneType] = None,
+ **kwargs
+) -> Dict[str, Any]
+
Get the queryables available for the given collection_id.
+If collection_id is None, returns the intersection of all queryables over all +collections.
+This base implementation returns a blank queryable schema. This is not allowed +under OGC CQL but it is allowed by the STAC API Filter Extension +stac-api-extensions/filter#queryables
+class BaseTransactionsClient(
+
+)
+
Defines a pattern for implementing the STAC API Transaction Extension.
+def create_collection(
+ self,
+ collection: stac_fastapi.types.stac.Collection,
+ **kwargs
+) -> Union[stac_fastapi.types.stac.Collection, starlette.responses.Response, NoneType]
+
Create a new collection.
+Called with POST /collections
.
Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
collection | +None | +the collection | +None | +
Returns:
+Type | +Description | +
---|---|
None | +The collection that was created. | +
def create_item(
+ self,
+ collection_id: str,
+ item: Union[stac_fastapi.types.stac.Item, stac_fastapi.types.stac.ItemCollection],
+ **kwargs
+) -> Union[stac_fastapi.types.stac.Item, starlette.responses.Response, NoneType]
+
Create a new item.
+Called with POST /collections/{collection_id}/items
.
Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
item | +None | +the item or item collection | +None | +
collection_id | +None | +the id of the collection from the resource path | +None | +
Returns:
+Type | +Description | +
---|---|
None | +The item that was created or None if item collection. | +
def delete_collection(
+ self,
+ collection_id: str,
+ **kwargs
+) -> Union[stac_fastapi.types.stac.Collection, starlette.responses.Response, NoneType]
+
Delete a collection.
+Called with DELETE /collections/{collection_id}
Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
collection_id | +None | +id of the collection. | +None | +
Returns:
+Type | +Description | +
---|---|
None | +The deleted collection. | +
def delete_item(
+ self,
+ item_id: str,
+ collection_id: str,
+ **kwargs
+) -> Union[stac_fastapi.types.stac.Item, starlette.responses.Response, NoneType]
+
Delete an item from a collection.
+Called with DELETE /collections/{collection_id}/items/{item_id}
Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
item_id | +None | +id of the item. | +None | +
collection_id | +None | +id of the collection. | +None | +
Returns:
+Type | +Description | +
---|---|
None | +The deleted item. | +
def update_collection(
+ self,
+ collection: stac_fastapi.types.stac.Collection,
+ **kwargs
+) -> Union[stac_fastapi.types.stac.Collection, starlette.responses.Response, NoneType]
+
Perform a complete update on an existing collection.
+Called with PUT /collections
. It is expected that this item already
+exists. The update should do a diff against the saved collection and
+perform any necessary updates. Partial updates are not supported by the
+transactions extension.
Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
collection | +None | +the collection (must be complete) | +None | +
collection_id | +None | +the id of the collection from the resource path | +None | +
Returns:
+Type | +Description | +
---|---|
None | +The updated collection. | +
def update_item(
+ self,
+ collection_id: str,
+ item_id: str,
+ item: stac_fastapi.types.stac.Item,
+ **kwargs
+) -> Union[stac_fastapi.types.stac.Item, starlette.responses.Response, NoneType]
+
Perform a complete update on an existing item.
+Called with PUT /collections/{collection_id}/items
. It is expected
+that this item already exists. The update should do a diff against the
+saved item and perform any necessary updates. Partial updates are not
+supported by the transactions extension.
Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
item | +None | +the item (must be complete) | +None | +
collection_id | +None | +the id of the collection from the resource path | +None | +
Returns:
+Type | +Description | +
---|---|
None | +The updated item. | +
class LandingPageMixin(
+ stac_version: str = '1.0.0',
+ landing_page_id: str = 'stac-fastapi',
+ title: str = 'stac-fastapi',
+ description: str = 'stac-fastapi'
+)
+
Create a STAC landing page (GET /).
+stac_fastapi.types.errors module.
+class ConflictError(
+ /,
+ *args,
+ **kwargs
+)
+
Database conflict.
+args
+
def with_traceback(
+ ...
+)
+
Exception.with_traceback(tb) --
+set self.traceback to tb and return self.
+class DatabaseError(
+ /,
+ *args,
+ **kwargs
+)
+
Generic database errors.
+args
+
def with_traceback(
+ ...
+)
+
Exception.with_traceback(tb) --
+set self.traceback to tb and return self.
+class ForeignKeyError(
+ /,
+ *args,
+ **kwargs
+)
+
Foreign key error (collection does not exist).
+args
+
def with_traceback(
+ ...
+)
+
Exception.with_traceback(tb) --
+set self.traceback to tb and return self.
+class InvalidQueryParameter(
+ /,
+ *args,
+ **kwargs
+)
+
Error for unknown or invalid query parameters.
+Used to capture errors that should respond according to +docs.opengeospatial.org/is/17-069r3/17-069r3.html#query_parameters
+args
+
def with_traceback(
+ ...
+)
+
Exception.with_traceback(tb) --
+set self.traceback to tb and return self.
+class NotFoundError(
+ /,
+ *args,
+ **kwargs
+)
+
Resource not found.
+args
+
def with_traceback(
+ ...
+)
+
Exception.with_traceback(tb) --
+set self.traceback to tb and return self.
+class StacApiError(
+ /,
+ *args,
+ **kwargs
+)
+
Generic API error.
+args
+
def with_traceback(
+ ...
+)
+
Exception.with_traceback(tb) --
+set self.traceback to tb and return self.
+ + + + + + +Base api extension.
+class ApiExtension(
+ conformance_classes: List[str] = NOTHING,
+ schema_href: Union[str, NoneType] = None
+)
+
Abstract base class for defining API extensions.
+GET
+
POST
+
def get_request_model(
+ self,
+ verb: Union[str, NoneType] = 'GET'
+) -> Union[pydantic.main.BaseModel, NoneType]
+
Return the request model for the extension.method.
+The model can differ based on HTTP verb
+def register(
+ self,
+ app: fastapi.applications.FastAPI
+) -> None
+
Register the extension with a FastAPI application.
+Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
app | +None | +target FastAPI application. | +None | +
Returns:
+Type | +Description | +
---|---|
None | +None | +
Backend submodule.
+Link helpers.
+INFERRED_LINK_RELS
+
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.
+class BaseLinks(
+ collection_id: str,
+ base_url: str
+)
+
Create inferred links common to collections and items.
+def root(
+ self
+) -> Dict[str, Any]
+
Return the catalog root.
+class CollectionLinks(
+ collection_id: str,
+ base_url: str
+)
+
Create inferred links specific to collections.
+def create_links(
+ self
+) -> List[Dict[str, Any]]
+
Return all inferred links.
+def items(
+ self
+) -> Dict[str, Any]
+
Create the items
link.
def parent(
+ self
+) -> Dict[str, Any]
+
Create the parent
link.
def root(
+ self
+) -> Dict[str, Any]
+
Return the catalog root.
+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.
+def collection(
+ self
+) -> Dict[str, Any]
+
Create the collection
link.
def create_links(
+ self
+) -> List[Dict[str, Any]]
+
Return all inferred links.
+def parent(
+ self
+) -> Dict[str, Any]
+
Create the parent
link.
def root(
+ self
+) -> Dict[str, Any]
+
Return the catalog root.
+def self(
+ self
+) -> Dict[str, Any]
+
Create the self
link.
rfc3339.
+RFC33339_PATTERN
+
def now_in_utc(
+
+) -> datetime.datetime
+
Return a datetime value of now with the UTC timezone applied.
+def now_to_rfc3339_str(
+
+) -> str
+
Return an RFC 3339 string representing now.
+def rfc3339_str_to_datetime(
+ s: str
+) -> datetime.datetime
+
Convert a string conforming to RFC 3339 to a :class:datetime.datetime
.
Uses :meth:iso8601.parse_date
under the hood.
Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
s | +str | +The string to convert to :class:datetime.datetime . |
+None | +
Returns:
+Type | +Description | +
---|---|
str | +The datetime represented by the ISO8601 (RFC 3339) formatted string. | +
Raises:
+Type | +Description | +
---|---|
ValueError | +If the string is not a valid RFC 3339 string. | +
def str_to_interval(
+ interval: str
+) -> Union[Tuple[Union[datetime.datetime, NoneType], Union[datetime.datetime, NoneType]], NoneType]
+
Extract a tuple of datetimes from an interval string.
+Interval strings are defined by +OGC API - Features Part 1 for the datetime query parameter value. These follow the +form '1985-04-12T23:20:50.52Z/1986-04-12T23:20:50.52Z', and allow either the start +or end (but not both) to be open-ended with '..' or ''.
+Args:
+ interval (str) : The interval string to convert to a :class:datetime.datetime
+ tuple.
Raises: + ValueError: If the string is not a valid interval string.
+ + + + + + +stac_fastapi.types.search module.
+NumType
+
def str2list(
+ x: str
+) -> Union[List, NoneType]
+
Convert string to list base on , delimiter.
+class APIRequest(
+
+)
+
Generic API Request base class.
+def kwargs(
+ self
+) -> Dict
+
Transform api request params into format which matches the signature of the
+endpoint.
+class BaseSearchGetRequest(
+ collections: str = None,
+ ids: str = None,
+ bbox: str = None,
+ intersects: Union[str, NoneType] = None,
+ datetime: Union[str, NoneType] = None,
+ limit: Union[int, NoneType] = 10
+)
+
Base arguments for GET Request.
+def kwargs(
+ self
+) -> Dict
+
Transform api request params into format which matches the signature of the
+endpoint.
+class BaseSearchPostRequest(
+ __pydantic_self__,
+ **data: Any
+)
+
Search model.
+Replace base model in STAC-pydantic as it includes additional fields, not in the core +model. +github.com/radiantearth/stac-api-spec/tree/master/item-search#query-parameter-table
+PR to fix this: +stac-utils/stac-pydantic!100
+Config
+
def construct(
+ _fields_set: Union[ForwardRef('SetStr'), NoneType] = None,
+ **values: Any
+) -> 'Model'
+
Creates a new model setting dict and fields_set from trusted or pre-validated data.
+Default values are respected, but no other validation is performed.
+Behaves as if Config.extra = 'allow'
was set since it adds all passed values
def from_orm(
+ obj: Any
+) -> 'Model'
+
def parse_file(
+ path: Union[str, pathlib.Path],
+ *,
+ content_type: 'unicode' = None,
+ encoding: 'unicode' = 'utf8',
+ proto: pydantic.parse.Protocol = None,
+ allow_pickle: bool = False
+) -> 'Model'
+
def parse_obj(
+ obj: Any
+) -> 'Model'
+
def parse_raw(
+ b: Union[str, bytes],
+ *,
+ content_type: 'unicode' = None,
+ encoding: 'unicode' = 'utf8',
+ proto: pydantic.parse.Protocol = None,
+ allow_pickle: bool = False
+) -> 'Model'
+
def schema(
+ by_alias: bool = True,
+ ref_template: 'unicode' = '#/definitions/{model}'
+) -> 'DictStrAny'
+
def schema_json(
+ *,
+ by_alias: bool = True,
+ ref_template: 'unicode' = '#/definitions/{model}',
+ **dumps_kwargs: Any
+) -> 'unicode'
+
def update_forward_refs(
+ **localns: Any
+) -> None
+
Try to update ForwardRefs on fields based on this Model, globalns and localns.
+def validate(
+ value: Any
+) -> 'Model'
+
def validate_bbox(
+ v: Union[Tuple[Union[float, int], Union[float, int], Union[float, int], Union[float, int]], Tuple[Union[float, int], Union[float, int], Union[float, int], Union[float, int], Union[float, int], Union[float, int]]]
+)
+
Check order of supplied bbox coordinates.
+def validate_datetime(
+ v
+)
+
Validate datetime.
+def validate_spatial(
+ v,
+ values
+)
+
Check bbox and intersects are not both supplied.
+end_date
+
Extract the end date from the datetime string.
+spatial_filter
+
Return a geojson-pydantic object representing the spatial filter for the search
+request.
+Check for both because the bbox
and intersects
parameters are
+mutually exclusive.
start_date
+
Extract the start date from the datetime string.
+def copy(
+ self: 'Model',
+ *,
+ include: Union[ForwardRef('AbstractSetIntStr'), ForwardRef('MappingIntStrAny'), NoneType] = None,
+ exclude: Union[ForwardRef('AbstractSetIntStr'), ForwardRef('MappingIntStrAny'), NoneType] = None,
+ update: Union[ForwardRef('DictStrAny'), NoneType] = None,
+ deep: bool = False
+) -> 'Model'
+
Duplicate a model, optionally choose which fields to include, exclude and change.
+Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
include | +None | +fields to include in new model | +None | +
exclude | +None | +fields to exclude from new model, as with values this takes precedence over include | +None | +
update | +None | +values to change/add in the new model. Note: the data is not validated before creating the new model: you should trust this data |
+None | +
deep | +None | +set to True to make a deep copy of the model |
+None | +
Returns:
+Type | +Description | +
---|---|
None | +new model instance | +
def dict(
+ self,
+ *,
+ include: Union[ForwardRef('AbstractSetIntStr'), ForwardRef('MappingIntStrAny'), NoneType] = None,
+ exclude: Union[ForwardRef('AbstractSetIntStr'), ForwardRef('MappingIntStrAny'), NoneType] = None,
+ by_alias: bool = False,
+ skip_defaults: Union[bool, NoneType] = None,
+ exclude_unset: bool = False,
+ exclude_defaults: bool = False,
+ exclude_none: bool = False
+) -> 'DictStrAny'
+
Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.
+def json(
+ self,
+ *,
+ include: Union[ForwardRef('AbstractSetIntStr'), ForwardRef('MappingIntStrAny'), NoneType] = None,
+ exclude: Union[ForwardRef('AbstractSetIntStr'), ForwardRef('MappingIntStrAny'), NoneType] = None,
+ by_alias: bool = False,
+ skip_defaults: Union[bool, NoneType] = None,
+ exclude_unset: bool = False,
+ exclude_defaults: bool = False,
+ exclude_none: bool = False,
+ encoder: Union[Callable[[Any], Any], NoneType] = None,
+ models_as_dict: bool = True,
+ **dumps_kwargs: Any
+) -> 'unicode'
+
Generate a JSON representation of the model, include
and exclude
arguments as per dict()
.
encoder
is an optional function to supply as default
to json.dumps(), other arguments as per json.dumps()
.
class Limit(
+ /,
+ *args,
+ **kwargs
+)
+
An positive integer that maxes out at 10,000.
+denominator
+
ge
+
gt
+
imag
+
le
+
lt
+
multiple_of
+
numerator
+
real
+
strict
+
def validate(
+ value: int
+) -> int
+
Validate the integer value.
+def as_integer_ratio(
+ self,
+ /
+)
+
Return integer ratio.
+Return a pair of integers, whose ratio is exactly equal to the original int +and with a positive denominator.
+++++++(10).as_integer_ratio() +(10, 1) +(-10).as_integer_ratio() +(-10, 1) +(0).as_integer_ratio() +(0, 1)
+
def bit_length(
+ self,
+ /
+)
+
Number of bits necessary to represent self in binary.
+++++++bin(37) +'0b100101' +(37).bit_length() +6
+
def conjugate(
+ ...
+)
+
Returns self, the complex conjugate of any int.
+def from_bytes(
+ bytes,
+ byteorder,
+ *,
+ signed=False
+)
+
Return the integer represented by the given array of bytes.
+bytes + Holds the array of bytes to convert. The argument must either + support the buffer protocol or be an iterable object producing bytes. + Bytes and bytearray are examples of built-in objects that support the + buffer protocol. +byteorder + The byte order used to represent the integer. If byteorder is 'big', + the most significant byte is at the beginning of the byte array. If + byteorder is 'little', the most significant byte is at the end of the + byte array. To request the native byte order of the host system, use + `sys.byteorder' as the byte order value. +signed + Indicates whether two's complement is used to represent the integer.
+def to_bytes(
+ self,
+ /,
+ length,
+ byteorder,
+ *,
+ signed=False
+)
+
Return an array of bytes representing an integer.
+length + Length of bytes object to use. An OverflowError is raised if the + integer is not representable with the given number of bytes. +byteorder + The byte order used to represent the integer. If byteorder is 'big', + the most significant byte is at the beginning of the byte array. If + byteorder is 'little', the most significant byte is at the end of the + byte array. To request the native byte order of the host system, use + `sys.byteorder' as the byte order value. +signed + Determines whether two's complement is used to represent the integer. + If signed is False and a negative integer is given, an OverflowError + is raised.
+class Operator(
+ /,
+ *args,
+ **kwargs
+)
+
Defines the set of operators supported by the API.
+eq
+
gt
+
gte
+
lt
+
lte
+
ne
+
STAC types.
+NumType
+
class Catalog(
+ /,
+ *args,
+ **kwargs
+)
+
STAC Catalog.
+def clear(
+ ...
+)
+
D.clear() -> None. Remove all items from D.
+def copy(
+ ...
+)
+
D.copy() -> a shallow copy of D
+def fromkeys(
+ iterable,
+ value=None,
+ /
+)
+
Create a new dictionary with keys from iterable and values set to value.
+def get(
+ self,
+ key,
+ default=None,
+ /
+)
+
Return the value for key if key is in the dictionary, else default.
+def items(
+ ...
+)
+
D.items() -> a set-like object providing a view on D's items
+def keys(
+ ...
+)
+
D.keys() -> a set-like object providing a view on D's keys
+def pop(
+ ...
+)
+
D.pop(k[,d]) -> v, remove specified key and return the corresponding value.
+If key is not found, d is returned if given, otherwise KeyError is raised
+def popitem(
+ self,
+ /
+)
+
Remove and return a (key, value) pair as a 2-tuple.
+Pairs are returned in LIFO (last-in, first-out) order. +Raises KeyError if the dict is empty.
+def setdefault(
+ self,
+ key,
+ default=None,
+ /
+)
+
Insert key with a value of default if key is not in the dictionary.
+Return the value for key if key is in the dictionary, else default.
+def update(
+ ...
+)
+
D.update([E, ]**F) -> None. Update D from dict/iterable E and F.
+If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] +If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v +In either case, this is followed by: for k in F: D[k] = F[k]
+def values(
+ ...
+)
+
D.values() -> an object providing a view on D's values
+class Collection(
+ /,
+ *args,
+ **kwargs
+)
+
STAC Collection.
+def clear(
+ ...
+)
+
D.clear() -> None. Remove all items from D.
+def copy(
+ ...
+)
+
D.copy() -> a shallow copy of D
+def fromkeys(
+ iterable,
+ value=None,
+ /
+)
+
Create a new dictionary with keys from iterable and values set to value.
+def get(
+ self,
+ key,
+ default=None,
+ /
+)
+
Return the value for key if key is in the dictionary, else default.
+def items(
+ ...
+)
+
D.items() -> a set-like object providing a view on D's items
+def keys(
+ ...
+)
+
D.keys() -> a set-like object providing a view on D's keys
+def pop(
+ ...
+)
+
D.pop(k[,d]) -> v, remove specified key and return the corresponding value.
+If key is not found, d is returned if given, otherwise KeyError is raised
+def popitem(
+ self,
+ /
+)
+
Remove and return a (key, value) pair as a 2-tuple.
+Pairs are returned in LIFO (last-in, first-out) order. +Raises KeyError if the dict is empty.
+def setdefault(
+ self,
+ key,
+ default=None,
+ /
+)
+
Insert key with a value of default if key is not in the dictionary.
+Return the value for key if key is in the dictionary, else default.
+def update(
+ ...
+)
+
D.update([E, ]**F) -> None. Update D from dict/iterable E and F.
+If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] +If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v +In either case, this is followed by: for k in F: D[k] = F[k]
+def values(
+ ...
+)
+
D.values() -> an object providing a view on D's values
+class Collections(
+ /,
+ *args,
+ **kwargs
+)
+
All collections endpoint.
+github.com/radiantearth/stac-api-spec/tree/master/collections
+def clear(
+ ...
+)
+
D.clear() -> None. Remove all items from D.
+def copy(
+ ...
+)
+
D.copy() -> a shallow copy of D
+def fromkeys(
+ iterable,
+ value=None,
+ /
+)
+
Create a new dictionary with keys from iterable and values set to value.
+def get(
+ self,
+ key,
+ default=None,
+ /
+)
+
Return the value for key if key is in the dictionary, else default.
+def items(
+ ...
+)
+
D.items() -> a set-like object providing a view on D's items
+def keys(
+ ...
+)
+
D.keys() -> a set-like object providing a view on D's keys
+def pop(
+ ...
+)
+
D.pop(k[,d]) -> v, remove specified key and return the corresponding value.
+If key is not found, d is returned if given, otherwise KeyError is raised
+def popitem(
+ self,
+ /
+)
+
Remove and return a (key, value) pair as a 2-tuple.
+Pairs are returned in LIFO (last-in, first-out) order. +Raises KeyError if the dict is empty.
+def setdefault(
+ self,
+ key,
+ default=None,
+ /
+)
+
Insert key with a value of default if key is not in the dictionary.
+Return the value for key if key is in the dictionary, else default.
+def update(
+ ...
+)
+
D.update([E, ]**F) -> None. Update D from dict/iterable E and F.
+If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] +If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v +In either case, this is followed by: for k in F: D[k] = F[k]
+def values(
+ ...
+)
+
D.values() -> an object providing a view on D's values
+class Conformance(
+ /,
+ *args,
+ **kwargs
+)
+
STAC Conformance Classes.
+def clear(
+ ...
+)
+
D.clear() -> None. Remove all items from D.
+def copy(
+ ...
+)
+
D.copy() -> a shallow copy of D
+def fromkeys(
+ iterable,
+ value=None,
+ /
+)
+
Create a new dictionary with keys from iterable and values set to value.
+def get(
+ self,
+ key,
+ default=None,
+ /
+)
+
Return the value for key if key is in the dictionary, else default.
+def items(
+ ...
+)
+
D.items() -> a set-like object providing a view on D's items
+def keys(
+ ...
+)
+
D.keys() -> a set-like object providing a view on D's keys
+def pop(
+ ...
+)
+
D.pop(k[,d]) -> v, remove specified key and return the corresponding value.
+If key is not found, d is returned if given, otherwise KeyError is raised
+def popitem(
+ self,
+ /
+)
+
Remove and return a (key, value) pair as a 2-tuple.
+Pairs are returned in LIFO (last-in, first-out) order. +Raises KeyError if the dict is empty.
+def setdefault(
+ self,
+ key,
+ default=None,
+ /
+)
+
Insert key with a value of default if key is not in the dictionary.
+Return the value for key if key is in the dictionary, else default.
+def update(
+ ...
+)
+
D.update([E, ]**F) -> None. Update D from dict/iterable E and F.
+If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] +If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v +In either case, this is followed by: for k in F: D[k] = F[k]
+def values(
+ ...
+)
+
D.values() -> an object providing a view on D's values
+class Item(
+ /,
+ *args,
+ **kwargs
+)
+
STAC Item.
+def clear(
+ ...
+)
+
D.clear() -> None. Remove all items from D.
+def copy(
+ ...
+)
+
D.copy() -> a shallow copy of D
+def fromkeys(
+ iterable,
+ value=None,
+ /
+)
+
Create a new dictionary with keys from iterable and values set to value.
+def get(
+ self,
+ key,
+ default=None,
+ /
+)
+
Return the value for key if key is in the dictionary, else default.
+def items(
+ ...
+)
+
D.items() -> a set-like object providing a view on D's items
+def keys(
+ ...
+)
+
D.keys() -> a set-like object providing a view on D's keys
+def pop(
+ ...
+)
+
D.pop(k[,d]) -> v, remove specified key and return the corresponding value.
+If key is not found, d is returned if given, otherwise KeyError is raised
+def popitem(
+ self,
+ /
+)
+
Remove and return a (key, value) pair as a 2-tuple.
+Pairs are returned in LIFO (last-in, first-out) order. +Raises KeyError if the dict is empty.
+def setdefault(
+ self,
+ key,
+ default=None,
+ /
+)
+
Insert key with a value of default if key is not in the dictionary.
+Return the value for key if key is in the dictionary, else default.
+def update(
+ ...
+)
+
D.update([E, ]**F) -> None. Update D from dict/iterable E and F.
+If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] +If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v +In either case, this is followed by: for k in F: D[k] = F[k]
+def values(
+ ...
+)
+
D.values() -> an object providing a view on D's values
+class ItemCollection(
+ /,
+ *args,
+ **kwargs
+)
+
STAC Item Collection.
+def clear(
+ ...
+)
+
D.clear() -> None. Remove all items from D.
+def copy(
+ ...
+)
+
D.copy() -> a shallow copy of D
+def fromkeys(
+ iterable,
+ value=None,
+ /
+)
+
Create a new dictionary with keys from iterable and values set to value.
+def get(
+ self,
+ key,
+ default=None,
+ /
+)
+
Return the value for key if key is in the dictionary, else default.
+def items(
+ ...
+)
+
D.items() -> a set-like object providing a view on D's items
+def keys(
+ ...
+)
+
D.keys() -> a set-like object providing a view on D's keys
+def pop(
+ ...
+)
+
D.pop(k[,d]) -> v, remove specified key and return the corresponding value.
+If key is not found, d is returned if given, otherwise KeyError is raised
+def popitem(
+ self,
+ /
+)
+
Remove and return a (key, value) pair as a 2-tuple.
+Pairs are returned in LIFO (last-in, first-out) order. +Raises KeyError if the dict is empty.
+def setdefault(
+ self,
+ key,
+ default=None,
+ /
+)
+
Insert key with a value of default if key is not in the dictionary.
+Return the value for key if key is in the dictionary, else default.
+def update(
+ ...
+)
+
D.update([E, ]**F) -> None. Update D from dict/iterable E and F.
+If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] +If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v +In either case, this is followed by: for k in F: D[k] = F[k]
+def values(
+ ...
+)
+
D.values() -> an object providing a view on D's values
+class LandingPage(
+ /,
+ *args,
+ **kwargs
+)
+
STAC Landing Page.
+def clear(
+ ...
+)
+
D.clear() -> None. Remove all items from D.
+def copy(
+ ...
+)
+
D.copy() -> a shallow copy of D
+def fromkeys(
+ iterable,
+ value=None,
+ /
+)
+
Create a new dictionary with keys from iterable and values set to value.
+def get(
+ self,
+ key,
+ default=None,
+ /
+)
+
Return the value for key if key is in the dictionary, else default.
+def items(
+ ...
+)
+
D.items() -> a set-like object providing a view on D's items
+def keys(
+ ...
+)
+
D.keys() -> a set-like object providing a view on D's keys
+def pop(
+ ...
+)
+
D.pop(k[,d]) -> v, remove specified key and return the corresponding value.
+If key is not found, d is returned if given, otherwise KeyError is raised
+def popitem(
+ self,
+ /
+)
+
Remove and return a (key, value) pair as a 2-tuple.
+Pairs are returned in LIFO (last-in, first-out) order. +Raises KeyError if the dict is empty.
+def setdefault(
+ self,
+ key,
+ default=None,
+ /
+)
+
Insert key with a value of default if key is not in the dictionary.
+Return the value for key if key is in the dictionary, else default.
+def update(
+ ...
+)
+
D.update([E, ]**F) -> None. Update D from dict/iterable E and F.
+If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] +If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v +In either case, this is followed by: for k in F: D[k] = F[k]
+def values(
+ ...
+)
+
D.values() -> an object providing a view on D's values
+ + + + + + +Library version.
+ + + + + + +{"use strict";/*!
+ * escape-html
+ * Copyright(c) 2012-2013 TJ Holowaychuk
+ * Copyright(c) 2015 Andreas Lubbe
+ * Copyright(c) 2015 Tiancheng "Timothy" Gu
+ * MIT Licensed
+ */var Ha=/["'&<>]/;Un.exports=$a;function $a(e){var t=""+e,r=Ha.exec(t);if(!r)return t;var o,n="",i=0,s=0;for(i=r.index;i