schema
¶
Classes:
-
OSMTags–Open street map tags.
-
OSMTagsOptional–Open street map tags, all optional.
-
OsmHutSchema–Open street map schema.
-
OsmProperties– -
OsmHutSource– -
OsmHut0Convert–
Attributes:
-
logger–
Attributes¶
Classes¶
OSMTags
¶
Open street map tags.
Attributes:
-
tourism(Literal['alpine_hut', 'wilderness_hut']) – -
wikidata(str | None) – -
name(str) – -
operator(str | None) – -
email(str | None) – -
contact_email(str | None) – -
phone(str | None) – -
contact_phone(str | None) – -
website(str | None) – -
contact_website(str | None) – -
note(str | None) – -
bed(str | None) – -
beds(str | None) – -
capacity(str | None) – -
access(str | None) – -
fireplace(str | None) – -
wall(str | None) – -
amenity(str | None) – -
shelter_type(str | None) – -
winter_room(str | None) – -
reservation(str | None) – -
ele(Elevation | None) –
OSMTagsOptional
¶
Open street map tags, all optional.
Attributes:
-
wikidata(str | None) – -
operator(str | None) – -
email(str | None) – -
contact_email(str | None) – -
phone(str | None) – -
contact_phone(str | None) – -
website(str | None) – -
contact_website(str | None) – -
note(str | None) – -
bed(str | None) – -
beds(str | None) – -
capacity(str | None) – -
access(str | None) – -
fireplace(str | None) – -
wall(str | None) – -
amenity(str | None) – -
shelter_type(str | None) – -
winter_room(str | None) – -
reservation(str | None) – -
tourism(str | None) – -
name(str | None) – -
ele(float | str | None) –
OsmHutSchema
¶
Open street map schema.
Methods:
-
get_id–Get open street map
id. -
get_name–Get open street map hut name.
-
get_location–Get open street map location.
Attributes:
-
model_config– -
osm_type(Literal['node', 'way', 'area'] | None) – -
osm_id(int) – -
lat(Latitude | None) – -
lon(Longitude | None) – -
center_lat(Latitude | None) – -
center_lon(Longitude | None) – -
tags(OSMTags) –
OsmProperties
¶
OsmHutSource
¶
Methods:
Attributes:
-
model_config– -
name(str) – -
location(LocationEleSchema | None) – -
source_id(str) – -
source_data(TSourceData_co | None) – -
source_properties(TProperties_co | None) – -
created(datetime) – -
source_properties_schema(dict) –Returns JSON schema for the 'source_properties' fields.
-
version(int) – -
source_name(str) –
Attributes¶
model_config
class-attribute
instance-attribute
¶
location
class-attribute
instance-attribute
¶
location: LocationEleSchema | None = Field(
None, description="Location of the hut."
)
source_id
class-attribute
instance-attribute
¶
source_data
class-attribute
instance-attribute
¶
source_properties
class-attribute
instance-attribute
¶
source_properties: TProperties_co | None = Field(
None, description="Additinal source data properties."
)
created
class-attribute
instance-attribute
¶
created: datetime = Field(
default_factory=now,
description="Version of the service when this entry was created.",
)
source_properties_schema
property
¶
Returns JSON schema for the 'source_properties' fields.
Returns:
-
dict–JSON schema.
Functions¶
show
¶
show(
source_id: bool = True,
location: bool = True,
elevation: bool = True,
source_name: bool = True,
version: bool = False,
created: bool = False,
) -> str
Returns a formatted string with the hut information which can be printed.
Parameters:
-
(source_id¶bool, default:True) –Show source ID.
-
(location¶bool, default:True) –Show location.
-
(elevation¶bool, default:True) –Show elevation.
-
(source_name¶bool, default:True) –Show source name.
-
(version¶bool, default:False) –Show verions.
-
(created¶bool, default:False) –Show created date.
Returns:
-
str–Formatted string.
OsmHut0Convert
¶
Classes:
-
FieldNotImplementedError–Field is not implemented.
Methods:
-
get_hut–Convert to hut.
Attributes:
-
source_data(TSourceData) – -
slug(str) – -
source(SourceSchema | None) – -
author(AuthorSchema | None) – -
location(LocationEleSchema) – -
notes(list[TranslationSchema]) – -
country_code(str | None) – -
open_monthly(OpenMonthlySchema) – -
include_photos(bool) – -
name(TranslationSchema) – -
source_name(str) – -
description(TranslationSchema) – -
owner(OwnerSchema | None) – -
url(str) – -
contacts(list[ContactSchema]) – -
comment(str) – -
capacity(CapacitySchema) – -
hut_type(HutTypeSchema) – -
wikidata_entity(None) – -
photos(list[PhotoSchema]) –Not supported for osm data, use wikidata isntead which are based on the osm data.
-
is_active(bool) – -
is_public(bool) – -
extras(dict[str, Any]) –
Attributes¶
source_data
class-attribute
instance-attribute
¶
photos
property
¶
photos: list[PhotoSchema]
Not supported for osm data, use wikidata isntead which are based on the osm data.
Classes¶
FieldNotImplementedError
¶
FieldNotImplementedError(
obj: BaseHutConverterSchema, field: str
)
Field is not implemented.
Parameters:
-
(obj¶BaseHutConverterSchema) –Current object.
-
(field¶str) –Field which is not implementd.