schema
¶
Classes:
-
WikidataPhotoInfo– -
WikidataPhotoAttributes– -
WikidataPhoto–Wikidata photo.
-
WikidataHutSchema–Open street map schema.
-
WikidataProperties– -
WikidataHutSource– -
WikidataHut0Convert–
Attributes:
-
logger–
Attributes¶
Classes¶
WikidataPhotoInfo
¶
Attributes:
-
model_config– -
size(int) – -
width(int) – -
height(int) – -
url(str) – -
descriptionurl(str) – -
descriptionshorturl(str) – -
mime(str) –
WikidataPhotoAttributes
¶
Attributes:
-
model_config– -
ns(int) – -
title(str) – -
missing(str) – -
known(str) – -
imagerepository(str) – -
imageinfo(list[WikidataPhotoInfo]) – -
contentmodel(str) – -
pagelanguage(str) – -
pagelanguagehtmlcode(str) – -
pagelanguagedir(str) – -
fullurl(str) – -
editurl(str) – -
canonicalurl(str) –
WikidataPhoto
¶
Wikidata photo.
Attributes:
-
model_config– -
title(str) – -
attributes(WikidataPhotoAttributes) –
WikidataHutSchema
¶
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– -
attributes(dict[str, Any]) – -
photo(WikidataPhoto | None) – -
wikidata_id(str) – -
name(str) – -
lat(Latitude | None) – -
lon(Longitude | None) –
WikidataProperties
¶
WikidataHutSource
¶
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.
WikidataHut0Convert
¶
Classes:
-
FieldNotImplementedError–Field is not implemented.
Methods:
-
get_hut–Convert to hut.
Attributes:
-
source_data(TSourceData) – -
include_photos(bool) – -
slug(str) – -
author(AuthorSchema | None) – -
location(LocationEleSchema) – -
notes(list[TranslationSchema]) – -
owner(OwnerSchema | None) – -
url(str) – -
contacts(list[ContactSchema]) – -
country_code(str | None) – -
comment(str) – -
capacity(CapacitySchema) – -
hut_type(HutTypeSchema) – -
open_monthly(OpenMonthlySchema) – -
is_active(bool) – -
is_public(bool) – -
extras(dict[str, Any]) – -
name(TranslationSchema) – -
source_name(str) – -
description(TranslationSchema) – -
photos(list[PhotoSchema]) – -
source(SourceSchema | None) – -
license(LicenseSchema | None) –
Attributes¶
source_data
class-attribute
instance-attribute
¶
Classes¶
FieldNotImplementedError
¶
FieldNotImplementedError(
obj: BaseHutConverterSchema, field: str
)
Field is not implemented.
Parameters:
-
(obj¶BaseHutConverterSchema) –Current object.
-
(field¶str) –Field which is not implementd.