Introduction
The project – Python Client for OGC Maps API, has mainly two milestones. The first one is to create an API wrapper for the OGC Maps endpoint. The second one is to create a terminal client for the same. I have completed these major milestones. The current status of the project and objectives for the final evaluation are discussed below.
Completed Objectives
The first milestone of the project was to create an API wrapper. I developed the API wrapper that makes GET requests to the map’s endpoint and returns map data. The wrapper includes options to pass optional arguments, which are then passed as query parameters to the API endpoint. Endpoints that return an image are saved locally in the directory that is using the wrapper. All image-based endpoints have an option to specify the image format.
All the response content is either JSON or HTML. By default, the endpoint returns a JSON response, but the API wrapper has an option to explicitly specify the response format. The response output can be prettified when used from the terminal client.
The API wrapper and the terminal client use a caching system to store the response results. This can be useful in situations involving the reuse of data. The following images shows the time taken to make a fresh request and a consecutive request on the same endpoint.
The terminal client has a rich help menu to get information about the commands, along with help texts to know about the options of a particular command. I also developed a new documentation for the API wrapper. It can be used to learn about the different commands and their options in a more detailed way.
Upcoming Milestones
I will be writing tests for the API functions, which will be helpful for future contributions to the project. These tests will be run either using GitHub actions, or using Travis CI.
Leave a Reply