city_retrofit/hub/helpers/location.py

55 lines
1.2 KiB
Python
Raw Permalink Normal View History

2021-08-26 13:27:43 -04:00
"""
Location module
SPDX - License - Identifier: LGPL - 3.0 - or -later
Copyright © 2022 Concordia CERC group
Project Coder Guille Gutierrez guillermo.gutierrezmorote@concordia.ca
Code contributors: Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca
2021-08-26 13:27:43 -04:00
"""
class Location:
2021-08-26 13:27:43 -04:00
"""
Location
"""
def __init__(self, country, city, region_code, climate_reference_city_latitude, climate_reference_city_longitude):
self._country = country
self._city = city
self._region_code = region_code
self._climate_reference_city_latitude = climate_reference_city_latitude
self._climate_reference_city_longitude = climate_reference_city_longitude
@property
def city(self):
2021-08-26 13:27:43 -04:00
"""
Get city name
2021-08-26 13:27:43 -04:00
"""
return self._city
@property
def country(self):
2021-08-26 13:27:43 -04:00
"""
Get country code
2021-08-26 13:27:43 -04:00
"""
return self._country
@property
def region_code(self):
"""
Get region
"""
return self._region_code
@property
def climate_reference_city_latitude(self):
"""
Get climate-reference-city latitude
"""
return self._climate_reference_city_latitude
@property
def climate_reference_city_longitude(self):
"""
Get climate-reference-city longitude
"""
return self._climate_reference_city_longitude