Giter Club home page Giter Club logo

sample's Introduction

Description

This is a fork of unisport sample task. A data benchmark can be found here.

Preparation of the application

In order to prepare the application to be able to launch you have to do the following steps.

  • First clone this repository.
  • Create virtual environment mkvirtualenv sample
  • Run pip install -r requirements.txt
  • Run python setup.py develop
  • Optionally you can run tests py.test
  • Finally, you can start the service ./start.sh

IMPORTANT: please note you need to have sqlite3 installed on your system.

Data location

By default the products you create or edit via web-page are strored in data/products.db. By default in data folder you can find the SQLite databse with data from benchmark. If you'd like to use fresh db you need to remove data/products.db file and run python createdb.py to create a database schema. If you'd like to fill fresh db with benchmark data go to examples folder and run python migration.py to migrate entries from data.json to data/products.db file.

Available endpoints

The following endpoints are available now.

/products/ Returns the first 10 objects ordered with the cheapest first.

/products/kids/ Returns the products where kids=1 ordered with the cheapest first

/products/?page=2 Returns correspondent page of products. Each page has 10 items.

/products/id/ Returns the individual product.

sample's People

Contributors

magnetonbora avatar fadur avatar olmar avatar marvin-unisport avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.