hydroserverpy.core.schemas package
Submodules
hydroserverpy.core.schemas.base module
- pydantic model hydroserverpy.core.schemas.base.HydroServerBaseModel[source]
Bases:
BaseModel
A base model for HydroServer entities that provides common attributes and functionality for HydroServer data.
- Variables:
_uid – A private attribute for storing the unique identifier (UUID) of the model.
- Config:
alias_generator: AliasGenerator = AliasGenerator(alias=None, validation_alias=<function <lambda> at 0x10670d940>, serialization_alias=<function <lambda> at 0x10670d5e0>)
validate_assignment: bool = True
- class Config[source]
Bases:
object
- alias_generator = AliasGenerator(alias=None, validation_alias=<function <lambda>>, serialization_alias=<function <lambda>>)
- validate_assignment = True
- model_post_init(__context)
This function is meant to behave like a BaseModel method to initialise private attributes.
It takes context as an argument since that’s what pydantic-core passes when calling it.
- Return type:
None
- Args:
self: The BaseModel instance. __context: The context.
- property uid: UUID | None
The unique identifier (UUID) of the model.
- Returns:
The UUID of the model.
- Return type:
Optional[UUID]
- pydantic model hydroserverpy.core.schemas.base.HydroServerCoreModel[source]
Bases:
HydroServerBaseModel
A core model for HydroServer entities that includes methods for data manipulation and persistence.
- Variables:
_original_data – A private attribute storing the original data used to initialize the model.
- Config:
alias_generator: AliasGenerator = AliasGenerator(alias=None, validation_alias=<function <lambda> at 0x10670d940>, serialization_alias=<function <lambda> at 0x10670d5e0>)
validate_assignment: bool = True
- delete()[source]
Delete the model from the server.
- Raises:
AttributeError – If the model’s UID is not set.
- Return type:
None
- model_post_init(_ModelMetaclass__context: Any) None
We need to both initialize private attributes and call the user-defined model_post_init method.
- Return type:
None
hydroserverpy.core.schemas.data_loaders module
- pydantic model hydroserverpy.core.schemas.data_loaders.DataLoader[source]
Bases:
HydroServerCoreModel
,DataLoaderFields
A model representing a DataLoader, extending the core functionality of HydroServerCoreModel with additional properties and methods.
- Variables:
_data_sources – A private attribute to cache the list of data sources associated with the DataLoader.
- Config:
alias_generator: AliasGenerator = AliasGenerator(alias=None, validation_alias=<function <lambda> at 0x10670d940>, serialization_alias=<function <lambda> at 0x10670d5e0>)
validate_assignment: bool = True
- Fields:
- load_observations()[source]
Load observations data from a local file or a remote URL into HydroServer using all data sources associated with this data loader.
- Return type:
None
- model_post_init(_ModelMetaclass__context: Any) None
We need to both initialize private attributes and call the user-defined model_post_init method.
- Return type:
None
- refresh()[source]
Refresh the data loader with the latest data from the server and update cached data sources.
- Return type:
None
- property data_sources: List[DataSource]
The data sources associated with the data loader. If not already cached, fetch the data sources from the server.
- Returns:
A list of data sources associated with the data loader.
- Return type:
List[DataSource]
hydroserverpy.core.schemas.data_sources module
- pydantic model hydroserverpy.core.schemas.data_sources.DataSource[source]
Bases:
HydroServerCoreModel
,DataSourceFields
A model representing a data source, extending the core functionality of HydroServerCoreModel with additional properties and methods.
- Variables:
_datastreams – A private attribute to cache the list of datastreams associated with the data source.
_data_loader – A private attribute to cache the data loader associated with the data source.
- Config:
alias_generator: AliasGenerator = AliasGenerator(alias=None, validation_alias=<function <lambda> at 0x10670d940>, serialization_alias=<function <lambda> at 0x10670d5e0>)
validate_assignment: bool = True
- Fields:
- load_observations()[source]
Load observations data from a local file or a remote URL into HydroServer using this data source configuration.
- Return type:
None
- model_post_init(_ModelMetaclass__context: Any) None
We need to both initialize private attributes and call the user-defined model_post_init method.
- Return type:
None
- refresh()[source]
Refresh the data source with the latest data from the server and update cached datastreams and data loader if they were previously loaded.
- Return type:
None
- property data_loader: DataLoader
Retrieve the data loader associated with the data source. If not already cached, fetch the data loader from the server.
- Returns:
The data loader associated with the data source.
- Return type:
- property datastreams: List[Datastream]
Retrieve the datastreams associated with the DataSource. If not already cached, fetch the datastreams from the server.
- Returns:
A list of datastreams associated with the data source.
- Return type:
List[Datastream]
- pydantic model hydroserverpy.core.schemas.data_sources.DataSourceFields[source]
Bases:
BaseModel
-
field crontab:
Optional
[str
] = None The crontab used to schedule when the data source should be loaded.
- Constraints:
max_length = 255
-
field data_loader_id:
UUID
[Required] The ID of the data loader responsible for loading this data source.
-
field data_source_thru:
Optional
[datetime
] = None The timestamp through which the data source contains data.
-
field data_start_row:
Optional
[int
] = None The row number where the data begins.
- Constraints:
gt = 0
lt = 9999
-
field delimiter:
Optional
[str
] = ',' The delimiter used by the data source file.
- Constraints:
max_length = 1
-
field end_time:
Optional
[datetime
] = None When the data source should stop being loaded.
-
field header_row:
Optional
[int
] = None The row number where the data begins.
- Constraints:
gt = 0
lt = 9999
-
field interval:
Optional
[int
] = None The time interval at which the data source should be loaded.
- Constraints:
gt = 0
lt = 9999
-
field interval_units:
Optional
[Literal
['minutes'
,'hours'
,'days'
,'weeks'
,'months'
]] = None The interval units used by the data source file.
-
field last_sync_message:
Optional
[str
] = None A message generated by the data loader it attempted to load data from this data source.
-
field last_sync_successful:
Optional
[bool
] = None Whether the last data loading attempt was successful of not.
-
field last_synced:
Optional
[datetime
] = None The last time the data loader attempted to load data from this data source.
-
field link:
Optional
[str
] = None The link to a remote data source file.
- Constraints:
max_length = 255
-
field name:
str
[Required] The name of the data source.
- Constraints:
max_length = 255
-
field next_sync:
Optional
[datetime
] = None The next time the data loader will attempt to load data from this data source.
-
field path:
Optional
[str
] = None The path to a local data source file.
- Constraints:
max_length = 255
-
field paused:
Optional
[bool
] = False Whether loading the data source should be paused or not.
-
field quote_char:
Optional
[str
] = '"' The quote delimiter character used by the data source file.
- Constraints:
max_length = 1
-
field start_time:
Optional
[datetime
] = None When the data source should begin being loaded.
-
field timestamp_column:
Union
[int
,str
] [Required] The column of the data source file containing the timestamps.
- Constraints:
max_length = 255
-
field timestamp_format:
Optional
[str
] = '%Y-%m-%dT%H:%M:%S%Z' The format of the timestamps, using Python’s datetime strftime codes.
- Constraints:
max_length = 255
-
field timestamp_offset:
Optional
[str
] = '+0000' An ISO 8601 time zone offset designator code to be applied to timestamps in the data source file.
- Constraints:
max_length = 255
-
field crontab:
hydroserverpy.core.schemas.datastreams module
- pydantic model hydroserverpy.core.schemas.datastreams.Datastream[source]
Bases:
HydroServerCoreModel
,DatastreamFields
A model representing a datastream, extending the core functionality of HydroServerCoreModel with additional properties and methods.
- Variables:
_thing – A private attribute to cache the associated thing entity.
_data_source – A private attribute to cache the associated data source entity.
_observed_property – A private attribute to cache the associated observed property entity.
_processing_level – A private attribute to cache the associated processing level entity.
_unit – A private attribute to cache the associated unit entity.
_sensor – A private attribute to cache the associated sensor entity.
- Config:
alias_generator: AliasGenerator = AliasGenerator(alias=None, validation_alias=<function <lambda> at 0x10670d940>, serialization_alias=<function <lambda> at 0x10670d5e0>)
validate_assignment: bool = True
- Fields:
- get_observations(start_time=None, end_time=None, page=1, page_size=100000, include_quality=False, fetch_all=False)[source]
Retrieve the observations for this datastream.
- Returns:
A DataFrame containing the observations associated with the datastream.
- Return type:
DataFrame
- load_observations(observations)[source]
Load a DataFrame of observations to the datastream.
- Parameters:
observations (DataFrame) – A pandas DataFrame containing the observations to be uploaded.
- Return type:
None
- Returns:
None
- model_post_init(_ModelMetaclass__context: Any) None
We need to both initialize private attributes and call the user-defined model_post_init method.
- Return type:
None
- refresh()[source]
Refresh the datastream with the latest data from the server and update cached entities if they were previously loaded.
- Return type:
None
- property data_source: DataSource
The data source entity associated with the datastream. If not already cached, fetch it from the server.
- Returns:
The data source entity associated with the datastream.
- Return type:
- property observed_property: ObservedProperty
Retrieve the observed property entity associated with the datastream. If not already cached, fetch it from the server.
- Returns:
The observed property entity associated with the datastream.
- Return type:
- property processing_level: ProcessingLevel
Retrieve the processing level entity associated with the datastream. If not already cached, fetch it from the server.
- Returns:
The processing level entity associated with the datastream.
- Return type:
- property sensor: Sensor
Retrieve the sensor entity associated with the datastream. If not already cached, fetch it from the server.
- Returns:
The sensor entity associated with the datastream.
- Return type:
Any
- pydantic model hydroserverpy.core.schemas.datastreams.DatastreamFields[source]
Bases:
BaseModel
- Fields:
-
field aggregation_statistic:
str
[Required] The statistic calculated over the time aggregation interval of observations in this datastream.
- Constraints:
max_length = 255
-
field data_source_column:
Optional
[str
] = None The name of the column containing this datastream’s observations in the data source file.
- Constraints:
max_length = 255
-
field data_source_id:
Optional
[UUID
] = None The data source for observations of this datastream.
-
field description:
str
[Required] A description of the datastream.
-
field intended_time_spacing:
Optional
[float
] = None The time interval at which observations should be made for this datastream.
-
field intended_time_spacing_units:
Optional
[Literal
['seconds'
,'minutes'
,'hours'
,'days'
]] = None The time unit for this datastream’s intended time spacing interval
-
field is_data_visible:
bool
= True Whether this observations associated with this datastream are publicly visible.
-
field is_visible:
bool
= True Whether this datastream is publicly visible.
-
field name:
str
[Required] The name of the datastream.
- Constraints:
max_length = 255
-
field no_data_value:
float
[Required] A numerical value representing no data at a given timestamp.
-
field observation_type:
str
[Required] The type of observation recorded in this datastream
- Constraints:
max_length = 255
-
field observed_property_id:
UUID
[Required] The physical property being observed for this datastream.
-
field phenomenon_begin_time:
Optional
[datetime
] = None The timestamp representing when the first phenomenon recorded in this datastream occurred.
-
field phenomenon_end_time:
Optional
[datetime
] = None The timestamp representing when the last phenomenon recorded in this datastream occurred.
-
field processing_level_id:
UUID
[Required] The processing level applied to this datastream.
-
field result_begin_time:
Optional
[datetime
] = None The timestamp representing when the first observation of this datastream was recorded.
-
field result_end_time:
Optional
[datetime
] = None The timestamp representing when the last observation of this datastream was recorded.
-
field result_type:
str
[Required] The type of result recorded in this datastream.
- Constraints:
max_length = 255
-
field sampled_medium:
str
[Required] The physical medium in which the observations were sampled.
- Constraints:
max_length = 255
-
field sensor_id:
UUID
[Required] The sensor used to record observations of this datastream.
-
field status:
Optional
[str
] = None The current status of this datastream.
- Constraints:
max_length = 255
-
field thing_id:
UUID
[Required] The site/thing from which observations of this datastream were recorded.
-
field time_aggregation_interval:
float
[Required] The time interval over which the aggregation statistic is applied to observations.
-
field time_aggregation_interval_units:
Literal
['seconds'
,'minutes'
,'hours'
,'days'
] [Required] The time unit for this datastream’s time aggregation interval
-
field unit_id:
UUID
[Required] The unit used to record observations for this datastream.
-
field value_count:
Optional
[int
] = None The total number of observations in this datastream.
- Constraints:
ge = 0
hydroserverpy.core.schemas.observed_properties module
- pydantic model hydroserverpy.core.schemas.observed_properties.ObservedProperty[source]
Bases:
HydroServerCoreModel
,ObservedPropertyFields
A model representing an observed property, extending the core functionality of HydroServerCoreModel with additional fields defined in ObservedPropertyFields.
- Config:
alias_generator: AliasGenerator = AliasGenerator(alias=None, validation_alias=<function <lambda> at 0x10670d940>, serialization_alias=<function <lambda> at 0x10670d5e0>)
validate_assignment: bool = True
- Fields:
- model_post_init(_ModelMetaclass__context: Any) None
We need to both initialize private attributes and call the user-defined model_post_init method.
- Return type:
None
- pydantic model hydroserverpy.core.schemas.observed_properties.ObservedPropertyFields[source]
Bases:
BaseModel
-
field code:
Optional
[str
] = None A code representing the observed property.
- Constraints:
max_length = 255
-
field definition:
str
[Required] The definition of the observed property.
-
field description:
Optional
[str
] = None A description of the observed property.
-
field name:
str
[Required] The name of the observed property.
- Constraints:
max_length = 255
-
field type:
Optional
[str
] = None The type of the observed property.
- Constraints:
max_length = 255
-
field code:
hydroserverpy.core.schemas.processing_levels module
- pydantic model hydroserverpy.core.schemas.processing_levels.ProcessingLevel[source]
Bases:
HydroServerCoreModel
,ProcessingLevelFields
A model representing a processing level, extending the core functionality of HydroServerCoreModel with additional fields defined in ProcessingLevelFields.
- Config:
alias_generator: AliasGenerator = AliasGenerator(alias=None, validation_alias=<function <lambda> at 0x10670d940>, serialization_alias=<function <lambda> at 0x10670d5e0>)
validate_assignment: bool = True
- Fields:
- model_post_init(_ModelMetaclass__context: Any) None
We need to both initialize private attributes and call the user-defined model_post_init method.
- Return type:
None
- pydantic model hydroserverpy.core.schemas.processing_levels.ProcessingLevelFields[source]
Bases:
BaseModel
-
field code:
str
[Required] A code representing the processing level.
- Constraints:
max_length = 255
-
field definition:
Optional
[str
] = None The definition of the processing level.
-
field explanation:
Optional
[str
] = None The explanation of the processing level.
-
field code:
hydroserverpy.core.schemas.result_qualifiers module
- pydantic model hydroserverpy.core.schemas.result_qualifiers.ResultQualifier[source]
Bases:
HydroServerCoreModel
,ResultQualifierFields
A model representing an result qualifier, extending the core functionality of HydroServerCoreModel with additional fields defined in ResultQualifierFields.
- Config:
alias_generator: AliasGenerator = AliasGenerator(alias=None, validation_alias=<function <lambda> at 0x10670d940>, serialization_alias=<function <lambda> at 0x10670d5e0>)
validate_assignment: bool = True
- Fields:
- model_post_init(_ModelMetaclass__context: Any) None
We need to both initialize private attributes and call the user-defined model_post_init method.
- Return type:
None
hydroserverpy.core.schemas.sensors module
- pydantic model hydroserverpy.core.schemas.sensors.Sensor[source]
Bases:
HydroServerCoreModel
,SensorFields
A model representing a sensor, extending the core functionality of HydroServerCoreModel with additional fields defined in SensorFields.
- Config:
alias_generator: AliasGenerator = AliasGenerator(alias=None, validation_alias=<function <lambda> at 0x10670d940>, serialization_alias=<function <lambda> at 0x10670d5e0>)
validate_assignment: bool = True
protected_namespaces: tuple = ()
- Fields:
- model_post_init(_ModelMetaclass__context: Any) None
We need to both initialize private attributes and call the user-defined model_post_init method.
- Return type:
None
- pydantic model hydroserverpy.core.schemas.sensors.SensorFields[source]
Bases:
BaseModel
- Config:
protected_namespaces: tuple = ()
- Fields:
-
field description:
str
[Required] A description of the sensor.
-
field encoding_type:
str
[Required] The encoding type of the sensor.
- Constraints:
max_length = 255
-
field manufacturer:
Optional
[str
] = None The manufacturer of the sensor.
- Constraints:
max_length = 255
-
field method_code:
Optional
[str
] = None A code representing the sensor method.
- Constraints:
max_length = 50
-
field method_link:
Optional
[str
] = None A link to a website or file that describes the sensor method.
- Constraints:
max_length = 500
-
field method_type:
str
[Required] The type of method used by this sensor to collect observations.
- Constraints:
max_length = 100
-
field model:
Optional
[str
] = None The model of the sensor.
- Constraints:
max_length = 255
-
field model_link:
Optional
[str
] = None A link to a website or file that describes the sensor model.
- Constraints:
max_length = 500
-
field name:
str
[Required] The name of the sensor.
- Constraints:
max_length = 255
hydroserverpy.core.schemas.things module
- pydantic model hydroserverpy.core.schemas.things.Archive[source]
Bases:
HydroServerBaseModel
A model representing an archive associated with a thing.
- Config:
alias_generator: AliasGenerator = AliasGenerator(alias=None, validation_alias=<function <lambda> at 0x10670d940>, serialization_alias=<function <lambda> at 0x10670d5e0>)
validate_assignment: bool = True
- Fields:
-
field datastream_ids:
List
[UUID
] [Required] The list of datastreams that are included in the archived data.
-
field frequency:
Optional
[Literal
['daily'
,'weekly'
,'monthly'
]] [Required] The frequency at which the site/thing should be archived.
-
field link:
Optional
[str
] = None A link to the HydroShare resource containing the archived site/thing.
- Constraints:
max_length = 255
-
field path:
str
[Required] The path within the HydroShare resource containing the archived data.
- Constraints:
max_length = 255
- model_post_init(_ModelMetaclass__context: Any) None
We need to both initialize private attributes and call the user-defined model_post_init method.
- Return type:
None
- pydantic model hydroserverpy.core.schemas.things.LocationFields[source]
Bases:
BaseModel
- Fields:
- Validators:
-
field country:
Optional
[str
] = None The ISO 3166-1 alpha-2 country code of the location.
- Constraints:
max_length = 2
- Validated by:
-
field county:
Optional
[str
] = None The county/district of the location.
- Constraints:
max_length = 200
-
field elevation_datum:
Optional
[str
] = None The datum used to represent the elevation of the location.
- Constraints:
max_length = 255
-
field elevation_m:
Optional
[float
] = None The elevation in meters of the location.
- Constraints:
ge = -99999
le = 99999
-
field latitude:
float
[Required] The WGS84 latitude of the location.
- Constraints:
ge = -90
le = 90
-
field longitude:
float
[Required] The WGS84 longitude of the location.
- Constraints:
ge = -180
le = 180
-
field state:
Optional
[str
] = None The state/province of the location.
- Constraints:
max_length = 200
- validator check_country_code » country[source]
Validate the country code to ensure it is an ISO 3166-1 alpha-2 country code.
- Parameters:
value (Optional[str]) – The country code to validate.
- Raises:
ValueError – If the country code is invalid.
- Returns:
The validated country code.
- Return type:
Optional[str]
- pydantic model hydroserverpy.core.schemas.things.Photo[source]
Bases:
HydroServerBaseModel
A model representing a photo associated with a thing.
- Config:
alias_generator: AliasGenerator = AliasGenerator(alias=None, validation_alias=<function <lambda> at 0x10670d940>, serialization_alias=<function <lambda> at 0x10670d5e0>)
validate_assignment: bool = True
- Fields:
-
field file_path:
str
[Required] The file path of the photo.
-
field link:
str
[Required] The link to the photo.
- model_post_init(_ModelMetaclass__context: Any) None
We need to both initialize private attributes and call the user-defined model_post_init method.
- Return type:
None
- pydantic model hydroserverpy.core.schemas.things.Tag[source]
Bases:
HydroServerBaseModel
A model representing a tag associated with a thing.
- Config:
alias_generator: AliasGenerator = AliasGenerator(alias=None, validation_alias=<function <lambda> at 0x10670d940>, serialization_alias=<function <lambda> at 0x10670d5e0>)
validate_assignment: bool = True
- Fields:
-
field key:
str
[Required] The key of the tag.
- Constraints:
max_length = 255
-
field value:
str
[Required] The value of the tag.
- Constraints:
max_length = 255
- model_post_init(_ModelMetaclass__context: Any) None
We need to both initialize private attributes and call the user-defined model_post_init method.
- Return type:
None
- pydantic model hydroserverpy.core.schemas.things.Thing[source]
Bases:
HydroServerCoreModel
,ThingFields
,LocationFields
A model representing a site/thing, combining core attributes from ThingFields and LocationFields with methods for interacting with related entities.
- Variables:
_datastreams – A private attribute to cache the list of datastreams associated with the thing.
_tags – A private attribute to cache the list of tags associated with the thing.
_photos – A private attribute to cache the list of photos associated with the thing.
_archive – A private attribute to cache the archive associated with the thing.
- Config:
alias_generator: AliasGenerator = AliasGenerator(alias=None, validation_alias=<function <lambda> at 0x10670d940>, serialization_alias=<function <lambda> at 0x10670d5e0>)
validate_assignment: bool = True
- Fields:
- Validators:
- add_photo(photo)[source]
Add a photo to the thing.
- Parameters:
photo (IO) – The photo file to upload.
- Return type:
None
- add_tag(key, value)[source]
Add a new tag to the thing.
- Parameters:
key (
str
) – The key of the new tag.value (
str
) – The value of the new tag.
- Return type:
None
- delete_photo(link)[source]
Delete a photo from the thing.
- Parameters:
link (
str
) – The link to the photo to delete.- Return type:
None
- delete_tag(key)[source]
Delete a tag from the thing.
- Parameters:
key (
str
) – The key of the tag to delete.- Return type:
None
- model_post_init(_ModelMetaclass__context: Any) None
We need to both initialize private attributes and call the user-defined model_post_init method.
- Return type:
None
- refresh()[source]
Refresh the thing with the latest data from the server and update cached datastreams, tags, photos, and archive if they were previously loaded.
- Return type:
None
- update_tag(key, value)[source]
Update the value of an existing tag on the thing.
- Parameters:
key (
str
) – The key of the tag to update.value (
str
) – The new value for the tag.
- Return type:
None
- property archive: Archive
The archive associated with the thing. If not already cached, fetch the archive from the server.
- Returns:
The archive associated with the thing.
- Return type:
- property datastreams: List[Datastream]
The datastreams associated with the thing. If not already cached, fetch the datastreams from the server.
- Returns:
A list of datastreams associated with the thing.
- Return type:
List[Datastream]
- pydantic model hydroserverpy.core.schemas.things.ThingFields[source]
Bases:
BaseModel
- Fields:
-
field data_disclaimer:
Optional
[str
] = None An optional data disclaimer to attach to observations collected at this site/thing.
-
field description:
str
[Required] A description of the site/thing.
-
field name:
str
[Required] The name of the site/thing.
- Constraints:
max_length = 200
-
field sampling_feature_code:
str
[Required] A code representing the sampling feature of the site/thing.
- Constraints:
max_length = 200
-
field sampling_feature_type:
str
[Required] The sampling feature type of the site/thing.
- Constraints:
max_length = 200
-
field site_type:
str
[Required] The type of the site/thing.
- Constraints:
max_length = 200
hydroserverpy.core.schemas.units module
- pydantic model hydroserverpy.core.schemas.units.Unit[source]
Bases:
HydroServerCoreModel
,UnitFields
A model representing a unit, extending the core functionality of HydroServerCoreModel with additional fields defined in UnitFields.
- Config:
alias_generator: AliasGenerator = AliasGenerator(alias=None, validation_alias=<function <lambda> at 0x10670d940>, serialization_alias=<function <lambda> at 0x10670d5e0>)
validate_assignment: bool = True
- Fields:
- model_post_init(_ModelMetaclass__context: Any) None
We need to both initialize private attributes and call the user-defined model_post_init method.
- Return type:
None
- class hydroserverpy.core.schemas.units.UnitFields[source]
Bases:
object
-
definition:
str
= FieldInfo(annotation=str, required=True, description='The definition of the unit.', json_schema_extra={'strip_whitespace': True})
-
name:
str
= FieldInfo(annotation=str, required=True, description='The name of the unit.', json_schema_extra={'strip_whitespace': True}, metadata=[MaxLen(max_length=255)])
-
symbol:
str
= FieldInfo(annotation=str, required=True, description='The symbol of the unit.', json_schema_extra={'strip_whitespace': True}, metadata=[MaxLen(max_length=255)])
-
type:
str
= FieldInfo(annotation=str, required=True, description='The type of the unit.', json_schema_extra={'strip_whitespace': True}, metadata=[MaxLen(max_length=255)])
-
definition: