Take-home Task

This task is intended to take 1 hour. We are looking for an indication of your thought process outside of an interview context, not a comprehensive and in-depth solution. We’ll discuss your responses in the next stage of the interview along with any points you haven’t had time to cover. If you find yourself spending longer than one hour, please note down what you would do if you had more time and we will discuss it in the next interview – do not worry about finishing.

When you have completed your solution, please push the code to Github, and send the repository URL to [email protected]. If the project is private, please also add bastienmenis as a project collaborator. Feel free to ask any questions or clarifications at any time.

Please do not use an LLM or code-generation tools (e.g. ChatGPT) for this exercise. We want to evaluate your software engineering expertise, not ChatGPT’s!

We are looking to evaluate:

Problem statement

Our company is building a new data integration. Data will be sent to our API in a plaintext format. We need to store this data and be able to retrieve it on-demand later. The API will be written in Python with Flask.

You are tasked with implementing the storage, transformation and retrieval logic through two API endpoints:

Codebase

The current API code can be found here: https://github.com/powerxai/starter-interview-swe-python. You can click the “Use this template” button in the Github interface to create your own copy of the repository to work on.

A basic API scaffolding has already been provided, which you are free to extend as you see fit. Please install additional libraries if you think they are appropriate. For simplicity, data can be stored in-memory using the implementation in db.py. Feel free to change this implementation to suit whatever data structure you would like to use.

Please use typed Python. Prefer structured types (e.g., dataclasses, TypedDicts) over unstructured dictionaries where possible. Please ensure the pyright static type checking passes as stated in the README file.

Sample Requests

To test your implementation, you may like to use these sample requests: