Location
Module for location class.
Location
Location Class.
Class representing location data.
Source code in report_generator/location_formatter/location.py
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 | |
__init__(continent='NoContinent', country='NoCountry', region='NoRegion', latitude=None, longitude=None, country_code='', country_full_name='')
Class init.
Init method for Location class
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
continent |
str
|
continent name string |
'NoContinent'
|
country |
str
|
country name string |
'NoCountry'
|
region |
str
|
region name string |
'NoRegion'
|
latitiude |
latitude float |
required | |
longitude |
float
|
longitude float |
None
|
country_code |
2 letter country code string |
''
|
|
country_full_name |
str
|
official full name of country string |
''
|
Source code in report_generator/location_formatter/location.py
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | |
__str__()
Get string magic method.
Source code in report_generator/location_formatter/location.py
62 63 64 65 66 67 68 69 70 71 72 | |
get_location_obj()
Get location object.
Creates a python object based on location data.
Returns:
| Name | Type | Description |
|---|---|---|
location_obj |
dict
|
python object representing location information. |
Source code in report_generator/location_formatter/location.py
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | |