clone the repository from github
git clone [email protected]:verthais/squirro-task.git
python -m virtualenv env-squirro
then activate virtual environment
env-squirro\Scripts\activate
. env-squirro/bin/activate
Upgrade pip just in case
python -m pip install --upgrade pip
then install all the dependencies
python -m pip -r requirements.txt
Run in the main folder
python -m pytest
python ./app.py
Application exposes three endpoints
Request:
GET /text/{id}
Response:
{
"text_id": string,
"text": string,
}
Request:
POST /text {'text': 'content'}
Response:
{
"text_id": string,
}
Request:
GET /summary/{text_id}
Response:
{
"id": string,
"summary": string,
"text_id": string,
}