module documentation
Undocumented
Function | add |
Undocumented |
Function | add |
Undocumented |
Function | router |
Creates a FastAPI router that exposes all contracts for a given tag. |
Function | schema |
Undocumented |
Variable | logger |
Undocumented |
def add_infer_route(route:
fastapi.APIRouter | fastapi.FastAPI
, location: FeatureLocation
, store: ContractStore
):
(source)
¶
Undocumented
def add_read_data_route(app:
fastapi.APIRouter | fastapi.FastAPI
, location: FeatureLocation
, store: ContractStore
):
(source)
¶
Undocumented
Creates a FastAPI router that exposes all contracts for a given tag.
If a contract have a source will it setup.
/contracts/{contract-name}/read/entity
/contracts/{contract-name}/read/entities
and if a model contract have an exposed model will it also setup
/contracts/{contract-name}/infer/entities
- Args:
- store (ContractStore): The contract store to expose.
expose_tag (str | None): the tag to expose. Will default to
is_exposed_through_api
. - Returns:
- APIRouter: A fastapi router