IoTAgent-Turtle

IoT Agent for the RDF Turtle 1.1 for statistical data representation

APACHE-2.0 License

Downloads
54
Stars
0
Committers
4

IoTAgent-Turtle

About The Project

A SDMX in RDF Turtle 1.1 format parser to generate valid JSON-LD and send to FIWARE Context Brokers using ETSI NGSI-LD.

It is based on a EBNF LALR(1) grammar.

This project is part of INTERSTAT. For more information about the INTERSTAT Project, please check the url https://cef-interstat.eu.

Built With

This project has been built using the following python libraries:

  • Lark, a parsing library for python
  • docopt, command-line interface description language
  • FastAPI, is high-performance web framework for building APIs with Python 3.6+ based on standard Python type hints.
  • Secure, a lightweight package that adds optional security headers for Python web frameworks.
  • Schema, a python library for validating Python data structures.
  • Uvicorn, an Asynchronous Server Gateway Interface (ASGI) web server implementation for Python.
  • Requests, an HTTP library for Python.
  • Python-Multipart, a streaming multipart parser for Python.
  • loguru, a library which aims to bring detailed logging in Python.

For more details about the versions of each library, please refer to requirements.txt.

Getting Started

This section explains the different steps that we need to do in order to start using this agent.

Prerequisites

The following software must be installed:

  • Python 3.10
  • pip 22.3 (python 3.10)
  • virtualenv 20.13.1

This is an example of how to list things you need to use the software and how to install them.

  • python, follow the recommendations for your own OS in Python/Downloads
  • pip, usually, it is automatically installed if you installed python in the previous steps. If you had already
    installed a python version, but you have no pip follow the instructions for your own OS in
    installation pip.
  • virtualenv, is a tool to create isolated Python environments, you can use other available options, but it is
    recommended to use one. You can follow the instructions to install it in your OS in
    Installation virtualenv.

Installation

The recommended installation method is using a virtualenv. Actually, the installation process is only about the python dependencies. By default, the service configuration follow the description of the local configuration file. You have to modify the broker attribute to specify any other location of the FIWARE Context Broker LD.

  1. Clone the repo
    git clone https://github.com/flopezag/IoTAgent-Turtle.git
    
  2. Define the configuration file: ./common/config.json
  3. Create the virtualenv
    virtualenv -ppython3.9 .env
    
  4. Activate the python environment
    source .env/bin/activate
    
  5. Install the requirements
    pip install -r requirements.txt
    

Usage

Use this space to show useful examples of how a project can be used. Additional screenshots, code examples and demos work well in this space. You may also link to more resources.

For more examples, please refer to the Documentation

Roadmap

  • Increase Unit Tests of the code
  • Cover several examples of use of the component
  • Testing deployment in Kubernetes Clusters
  • Improve Error Messages

See the open issues for a full list of proposed features (and known issues).

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated. If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Contact

Fernando López - @flopezaguilar - [email protected]

Project Link: https://github.com/flopezag/IoTAgent-Turtle

License

Distributed under the Apache2.0 License. See LICENSE for more information.