Giter VIP home page Giter VIP logo

osa-api-server's Introduction

API Server

build and test

Development

Make sure you have Python >= 3.6 installed in your development environment,

Install virtualenv, activate it and then install project dependencies

pip install -r requirements.txt

Run API server,

gunicorn --pythonpath . -k sync -b localhost:5000 main:app --reload

Swagger/OpenAPI based documentation can be obtained by accessing the following URL,

http://localhost:5000/api/swagger

Run unittest,

pip install -r requirements-test.txt
pytest

To Deploy it on OpenShift,

  • Build container image (e.g. docker)
  • Push container image to registry (e.g. quay.io)
  • use oc to deploy it on OpenShift,
docker build --no-cache -t <image_name:tag> .
docker push <registry>/<image_name:tag>
oc process -f openshift/template.yaml -p DOCKER_REGISTRY=<registry> -p DOCKER_IMAGE=<image_name> -p GREMLIN_DEFAULT_HOST=<gremlin_host> -p GREMLIN_DEFAULT_PORT=<gremlin_port> | oc create -f -

Ingest historical data

A command tool has been created to ingest historical data into database through API server,

Make sure dependencies of command tool has been installed in your development virtualenv,

pip install -r tools/requirements.txt

To ingest CSV to DB,

python tools/ingest_historical_csv.py <path_to_csv_file> --insert

To ingest Feedback,

python tools/ingest_historical_csv.py <path_to_csv_file> --feedback

QA Script Usage

A documentation has been created with details on how we can use QA scripts.

osa-api-server's People

Contributors

arajkumar avatar hpulla avatar rajusem avatar

Watchers

 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.