Giter Site home page Giter Site logo

testtask's Introduction

Simple rest service

This service can perform filtering and sorting operations on the given dataset.

How to try

flask run

After that you can perform simple GET requests to the http://localhost:5000/compensation_data endpoint. For example:

GET /compensation_data?bonus=0&fields=primary_country,gender,salary&sort=salary

The response for this will be in similar format:

{"result": "ok", "data": [{"primary_country": "Romania (RO)", "gender": "Male", "salary": 2500.0}, ...

Fields

  • timestamp
  • employment_type
  • company_name
  • company_size
  • primary_country
  • primary_city
  • company_industry
  • company_pub
  • experience_overall
  • experience_company
  • job_title
  • job_ladder
  • job_level
  • hours_per_week_req
  • hours_per_week_act
  • education
  • salary
  • bonus
  • stock_options
  • insurance
  • vacation
  • position_happiness
  • plan_to_resign
  • industry_direction_thoughts
  • gender
  • top_skills
  • bootcamp_thoughts

Possible operations

  • Filter by column value: ?column_name1=value1&column_name2=value2&...
  • Sort by columns: ?sort=column_name1,column_name2, ...
  • Specify fields: ?fields=column_name1,column_name2, ...
  • You can also apply condition to the field names:
    • column[gte]=value - Greater or equal
    • column[gt]=value - Greater than the value
    • column[le]=value - Lower or equal
    • column[l]=value - Lower than the value
    • column[e]=value - Equal to the value

Run unit tests

python -m unittest -v unit_tests

testtask's People

Watchers

Ivan Orlov 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.