Coder Social home page Coder Social logo

shantanoo-desai / tracking-iot-blockchain-service Goto Github PK

View Code? Open in Web Editor NEW
5.0 2.0 4.0 56 KB

RESTful API for NIMBLE Platform's Tracking and Tracing Frontend with IoT and Blockchain Integration

License: MIT License

Python 97.86% Dockerfile 2.14%
python3 python36 flask-restplus docker flask flask-pymongo influxdb

tracking-iot-blockchain-service's Introduction

Tracking-IoT-Blockchain Service

This is a Repository to provide RESTful APIs for EPCIS and IoT Information for NIMBLE-Platform. These APIs can provide data related to NIMBLE's Track&Trace services along with IoT Sensor Data Information as well as the platform's Blockchain Network.

Functionalities

These RESTful APIs communicate with:

  • EPCIS Repository (MongoDB Instance)
  • Sensor Repository (InfluxDB)
  • NIMBLE's HyperLedger Fabric API

Development

  • Written using python3.x

  • Enable a Virtual Environment

      python -m venv venv
    
  • Activate the Environment

    Linux

      source venv/bin/activate
    

    Windows

      venv/Scripts/activate.ps1
    
  • Install Dependencies

      pip install -r requirements.txt
    

    or

      python setup.py develop
    
  • Set APP_CONFIG to the configuration file variables e.g. testing.cfg or production.cfg in the nimble_iot_bc directory:

    Linux

      export APP_CONFIG=testing.cfg
    

    Windows (PowerShell)

      $env:APP_CONFIG = "testing.cfg"
    
  • enable debugging in the main.py:

      entrypoint.run(debug=True)
    
  • Run the app using

      python main.py
    

Development with Docker

    docker build -t nimble-iot-blockchain-api .

(see Deployment section for setting up environment file)

Documentation

Deployment

  • Disable debug mode in production using debug=False in main.py

  • The app is deployed with uWSGI Server

  • Change the settings for the uWSGI Server in app.ini

  • Adapt the APP_CONFIG variable in the docker-compose file to production.cfg with all environment variables necessary in it.

  • The production.cfg file MUST be in the nimble_iot_bc directory. Else, adapt the compose file with the path to the configuration accordingly (see volumes).

  • build using:

      docker-compose up --build
    

Docker

    docker --name=iot-tnt-bc-microservice -e APP_CONFIG=production.cfg  -p 5000:5000 shantanoodesai/nimble-iot-blockchain-api:latest

License

MIT License

Developed and Maintained by

Shantanoo Desai([email protected])

Faculty of Production Engineering, University Bremen. In collaboration with BIBA - Bremer Institut für Produktion und Logistik GmbH, Bremen, Germany

tracking-iot-blockchain-service's People

Contributors

dependabot[bot] avatar shantanoo-desai avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

tracking-iot-blockchain-service's Issues

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.