Senior Software Engineer - APIs - Code Test
Thank you for applying to Pricesearcher!
As part of your application process we would like you to complete a short technical challenge to assist in our evaluation of your application.
Your solution, as well as more complex ideas, improvements and suggestions will be discussed further at interview stage should your application progress.
You have been provided with 2 files of varying sizes, qualities, contents and formats. These files contain a list of randomly generated products from various brands and retailers.
Your task is to write a small command line application that on startup ingests this data as quickly and efficiently as possible. For the sake of keeping this test short it is fine to load it into memory, you do not need to use a database.
Following this your application should start an API server with two endpoints:
- An endpoint to retrieve a single product by its
- An endpoint that retrieves the N cheapest products (where N is a configurable number that the client can specify)
Your API endpoints should return the product data as JSON with the following fields:
idas a string
nameas a string
brandas a string
retaileras a string
priceas a float
in_stockas a boolean
Any fields that aren't available for a product should be returned as
The first file (products.csv.gz) is in the CSV file format and compressed with GZIP.
The second file (products.json) is in the JSON file format and is located in an AWS S3 bucket. Your application should download this once when it starts up.
You are free to implement this using whatever technologies you feel appropriate although as this is a primarily Python focussed role so it would be nice to see that used.
There is no time limit on how long you can spend on the task but around 2 to 3 hours is probably a good guide. As mentioned above any further improvements or ideas you have can be discussed in the interview.
Your submission will be judged on the overall quality of the solution with various factors such as the following considered:
- Some other words that end in 'ility'
Your work should be submitted as a Git repository. Hosted on a Git hosting website such as Github/Bitbucket or as a zip archive. If hosted publicly, please don't mention the interview in the repo or code, unless you feel comfortable making it public you're interviewing with us.
You should document how to run your submission as if the reader were a client consuming your API and if it relies on any external dependencies, what those are and how to install them.
For bonus points, include your favourite Gif. This will not affect your application, unless it is really great.