mr-fard4y / ticket-management-system

The small web service based on Flask, MongoDB, Docker

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Simple Web API

=========

Local installation

Install project from git repository, by running:

    git clone https://github.com/Fe-Nik-S/ticket-management-system
    cd ticket-management-system
    make init_all || pipenv install

Pipenv must be installed or just follow the on-screen instructions

Usage

For running service:

    make run_docker

OR

    docker-compose build && docker-compose up

and open http://localhost:8000

API

Get service version:
GET /api/
Get list of itineraries from DXB to BKK on 18-05-18 - template:
GET /api/search/DXB180518BKK?sort={price,duration}&order={asc,desc}
Get list of itineraries - optimal choice (sorted by price, duration in ascending order):
GET /api/search/DXB180518BKK
Get list of itineraries - cheapest itinerarie (sorted by price in ascending order):
GET /api/search/DXB180518BKK?sort=price
Get list of itineraries - the most expensive itinerarie (sorted by price in descending order):
GET /api/search/DXB180518BKK?sort=price&order=desc
Get list of itineraries - the shortest itinerarie (sorted by duration in ascending order):
GET /api/search/DXB180518BKK?sort=duration
Get list of itineraries - the longest itinerarie (sorted by duration in descending order):
GET /api/search/DXB180518BKK?sort=duration&order=desc

ToDo

Several improvements and fixes for the future:

  • Linters and code analyzing, static validation
  • Cover by functional and unit tests
  • Dockerization. Separate configs (nginx, unicorn, etc) to files
  • etc

Support

If you find some issues, please let me know.

About

The small web service based on Flask, MongoDB, Docker

License:MIT License


Languages

Language:Python 97.2%Language:Makefile 1.8%Language:Dockerfile 1.0%