IDA (InDex reAder) is an API for providing data from the well-known share indices (DAX & S&P). It is intended to represent an exemplary application that exists within Union Investment and is designed to test the basic programming skills of applicants.
Technically, Python 3 and FastAPI are used for the API. Both technologies allow fast and stable web service development.
Before you start, you must:
- Install Python 3.10.x.
- Install Pipenv
To activate this project's virtualenv, run following command:
pipenv shell
Then install the whole project dependencies with:
pipenv install --dev
After successful installation the API can be started locally with the command:
uvicorn main:app --reload
You will now be able of accessing the API via your browser on http://127.0.0.1:8000.
Please complete the exercises within one week and submit the results as previously agreed.We will discuss the task together in a subsequent interview. All tasks can be solved with the help of the documentation.
If you have direct questions about the Recrutiment Test, you can contact us directly via e-mail at [email protected].
Good luck with the exercises!
Extend the API with another endpoint that should be accessible via the /getdata
path. This endpoint is to return all share indices in a list page by page. Each page should contain a maximum of 30 elements.
Please complete the create_upload_files
method so that you can update share indices data at runtime. The data should be sent in the form of a CSV file using an HTTP POST request.
For example, the following curl command can be used for testing:
curl -d @daxsp.csv http://127.0.0.1:8000/uploadfile
Finally, please write appropriate unit tests for your two tasks using the components provided by FastAPI. To do this, expand the test_main.py file. The tests can be run with the following command:
pytest
Copyright © 2023 Union IT-Services GmbH. All rights reserved.