https://github.com/quatrolavita/simporter_test_task
Simporter Test Task
https://github.com/quatrolavita/simporter_test_task
docker docker-compose flask pandas-python postgresql python3 sqlalchemy unit-testing
Last synced: 3 months ago
JSON representation
Simporter Test Task
- Host: GitHub
- URL: https://github.com/quatrolavita/simporter_test_task
- Owner: quatrolavita
- License: mit
- Created: 2020-08-23T13:58:42.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-08-23T14:14:16.000Z (almost 6 years ago)
- Last Synced: 2025-11-13T10:03:35.921Z (8 months ago)
- Topics: docker, docker-compose, flask, pandas-python, postgresql, python3, sqlalchemy, unit-testing
- Language: Python
- Homepage:
- Size: 501 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Simporter Test Task
This application requires two API methods `/api/info` and `/api/timeline`
`/api/info`
This API method returns JSON with possible filtering (list of attributes and list of values for each attribute)
Like this:
```
{
"asin": [],
"brand": [],
"source": [],
"stars": []
}
```
`/api/timeline/?`
This API method returns JSON with timeline information according to input parameters
Like this:
```
{“timeline”:
[{
“date”: “2019-01-01”,
"value": 10},
...
] }
```
# HOW TO START?
1. Clone git repo
2. Install docker [tutorial](https://docs.docker.com/engine/install/ubuntu/)
3. `sudo docker-compose build app`
4. `sudo docker-compose up`
5. Than you can follow `http://localhost:5000/api/info` or `http://localhost:5000/api/timeline?`
If you want to restart app just enter commands below:
```
sudo docker-compose down
sudo docker-compose up
```
# HOW TO TEST?
1. Clone git repo
2. Install docker [tutorial](https://docs.docker.com/engine/install/ubuntu/)
3. `sudo docker-compose build app`
4. `sudo docker-compose run app sh -c "python manage.py test --coverage"`