modules package

Submodules

modules.flask_app module

modules.flask_app.application()

Download page indexing.

Returns:redirect to downloadable file
modules.flask_app.index()

Main page indexing.

Returns:rendered index.html page
modules.flask_app.map()

Map page indexing.

Returns:rendered error.html or mars.html page
modules.flask_app.photos()

Gallery page indexing.

Returns:rendered search.html page
modules.flask_app.search()

Searching page indexing.

Returns:rendered gallery.html or no_match.html page

modules.images module

modules.images.search_images(date, camera)

Applies given date and camera type to the URL and retrieves data from it.

Parameters:
  • date – str
  • camera – str
Returns:

set/None

modules.make_map module

modules.make_map.build_map(data, links)

Builds map with folium and custom Map class.

Parameters:
  • data – generator object
  • links – Array-class object
Returns:

Map-class object

modules.make_map.find_images()

Finds 20 images for displaying on map.

Returns:Array-class object
modules.make_map.main()

Main function which launches map creation and checks whether to update data file locations.csv.

Returns:None
modules.make_map.readfile()

Reads data from locations.csv file and returns it as a generator object.

Returns:generator object

modules.parse_location module

modules.parse_location.get_locations()

Retrieves information about location of a mars rover from online XML file.

Returns:list
modules.parse_location.write_to_file(locations, attr='w')

Writes longitude and latitude into CSV file.

Parameters:
  • locations – list
  • attr – str
Returns:

None

Module contents