Scrape a local dataset of employee data and return the processed data at an endpoint using Python and Flask.
Feel free to consult as many outside resources as you would like and push your code to a fork of this repository when you are done.
Questions, errors, or needed clarifications? Reach out here: sirajsc2 [at] illinois [dot] edu
.
- Fork this repository
- Write a function to process data from
data.csv
into a JSON structure as follows
{
employees: [
{
name: <full name of employee>,
timezone: <timezone of employee>,
dept: <department of employee>
}
...
]
}
- Return your processed data at a new endpoint located at
/api/fetch
- Don't forget to commit and push your solution
- Clone your fork of this repository
- Ensure you have a Python 3 environment to run this Flask server
- Install required packages by executing
pip3 install requirements.txt
ORpip install requirements.txt
depending on your system installation of Python - Save the following environment variable via
export FLASK_RUN=__init__.py
(for macOS/Linux, environment variables are under Control Panel/System on Windows w/o WSL) - Execute
flask run
in the repository to run a development server