FiLiP

FiLiP: A python software development kit (SDK) for accelerating the development of services based on FIWARE IoT platform - Published in JOSS (2024)

https://github.com/rwth-ebc/filip

Science Score: 98.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 15 DOI reference(s) in README and JOSS metadata
  • Academic publication links
    Links to: joss.theoj.org
  • Committers with academic emails
    31 of 40 committers (77.5%) from academic institutions
  • Institutional organization owner
    Organization rwth-ebc has institutional domain (www.ebc.eonerc.rwth-aachen.de)
  • JOSS paper metadata
    Published in Journal of Open Source Software

Keywords

fiware fiware-iot-agents fiware-ngsi-v2 fiware-orion fiware-quantum-leap hacktoberfest iot maintained python tool

Keywords from Contributors

villas mesh

Scientific Fields

Sociology Social Sciences - 87% confidence
Engineering Computer Science - 60% confidence
Last synced: 4 months ago · JSON representation

Repository

FIWARE Library for Python (FiLiP) to work with FIWARE API

Basic Info
  • Host: GitHub
  • Owner: RWTH-EBC
  • License: bsd-3-clause
  • Language: Python
  • Default Branch: master
  • Homepage:
  • Size: 82.9 MB
Statistics
  • Stars: 24
  • Watchers: 12
  • Forks: 14
  • Open Issues: 17
  • Releases: 18
Topics
fiware fiware-iot-agents fiware-ngsi-v2 fiware-orion fiware-quantum-leap hacktoberfest iot maintained python tool
Created over 6 years ago · Last pushed 4 months ago
Metadata Files
Readme Changelog Contributing License

README.md

E.ON EBC RWTH Aachen University

FiLiP

pylint Documentation coverage License build DOI

FiLiP (FIWARE Library for Python) is a python Software Development Kit (SDK) for accelerating the development of web services that use Fiware's Generic Enablers (GEs) as backend.

It is mainly based on the Pydantic package which is a sophisticated library for data validation and settings management using python type annotations. Pydantic enforces type hints at runtime, and provides user friendly errors when data is invalid. We mainly use the Pydantic model to build our own data model structure required for efficient data model parsing and validation and interaction with FIWARE services' RestAPIs.

For API interaction, FiLiP relies on the well-known requests package. It is important to understand that we do not in any way restrict any features of requests.

Furthermore, FiLiP is designed to help with the fast development of FIWARE-based applications and avoid hundreds of lines of boilerplate, but it cannot substitute learning the basic concepts behind the used FIWARE components.

General Motivation

Why implement a client library when clients can be auto-generated from openapi documentation? A general prerequisite to do so is that the documentation is in depth and of good quality. While FIWARE generally provides openapi documentation, here are some thoughts on the challenges of auto-generating client code from these documents:

  • Auto-generated code tends to become rather bulky and its quality strongly depends on the provided input data.
  • Manipulating generated code can result in a big hassle for maintenance if additional features need to be integrated.
  • The underlying NGSI (Next Generation Service Interface) for FIWARE is a rather generic specification. Hence, generated models may also be of generic types as lists and dicts in Python. So there is no real benefit. Furthermore, there is no chance for reasonable validation and error handling.

Getting started

The following section shortly describes how to use the library.

Prerequisites

Since FiLiP is designed as a client library, it requires a server that provides the target Service-APIs. Hence, if you do not yet have a running instance of a FIWARE based platform, using docker is the most convenient way to set it up. Please check here for a tutorial on this. If this is not an option for you, FIWARE also provides a testing server. You can register for a testing account here.

Note: FiLiP is now compatible to Pydantic V2. If your program still require Pydantic V1.x for some reason, please use release v0.2.5 or earlier version of FiLiP. Besides, we recommended to set pydantic~=1.10 in the requirements.txt, otherwise Pydantic V2 might still be installed.

Supported Python Versions

| Version | Status | |-----------|----------------| | 3.7 | ❌ Deprecated | | 3.8 | ❌ Deprecated | | 3.9 | ✅ Tested | | 3.10 | ✅ Tested | | 3.11 | ✅ Tested | | 3.12 | ✅ Tested |

✅ Tested python versions have passed the unittests

Installation

The easiest way to install the library is via pip:

pip install -U filip

If you want to benefit from the latest changes, use the following command (This will install the current master branch from this repository):

pip install -U git+git://github.com/RWTH-EBC/filip

Note: For development, you should install FiLiP in editable mode with the following command: bash pip install -e .[development] The development option will install extra libraries required for contribution. Please check the CONTRIBUTING.md for more information.

Install extra dependencies for tutorials and examples (optional)

If you need to go through the tutorials or examples, please install filip with extra module tutorials: pip install -U filip[tutorials]

Install semantics module (optional)

If you want to use the optional semantics module, use the following command. This will install the libraries (e.g., igraph and rdflib) that only required for the semantics module): pip install -U filip[semantics]

Introduction to FIWARE

The following section introduces FIWARE. If you are already familiar with FIWARE, you can skip this section and go straight to Getting Started.

What is FIWARE?

FIWARE is a framework of open-source cloud platform components, created to facilitate the development of smart solutions within various application domains. At the moment, the FIWARE catalogue contains over 30 interoperable software modules, so-called Generic Enablers (GE) for developing and providing customized IoT platform solutions.

To get familiar with the APIs of the different modules we highly recommend checking the step-by-step tutorial. It provides a good overview on FIWARE and its basic usage. Whereas the tutorial helps to understand most of the general concepts, for a deep dive, where you can learn about the components in more detail, FIWARE also offers extended lessons through their academy.

However, usually one only requires a small set of components. Hence, we recommend using the cited pages only as needed.

How to set up a FIWARE platform?

The easiest way to set up a FIWARE platform is by using docker as all GEs are open-source and distributed as docker containers on dockerhub.

However, as mentioned before, for most use cases only a subset of GEs is required. Hence, we wrote a small tutorial explaining how to set up a platform suited for most use cases within the energy domain.

FIWARE GEs covered by FiLiP

FiLiP is a library developed on demand. Hence, we do not aim to cover the APIs of all GEs that are included in the catalogue. This would mean an unnecessary development overhead. Therefore, FiLiP currently only covers the APIs of the following GEs:

  • NGSIv2 Context Broker for managing context data. We use its reference implementation ORION for testing. There is also warning in Filip if you are using an old version of ORION which could have breaking changes.

  • NGSI-LD Context Broker for managing context data with Linked Data concept. The functionalities that FiLiP supports are closely aligned with the specification NGSI-LD V1.3.1, which is according to the FIWARE catalogue the latest spec version that has been implemented by all three brokers (Orion-LD, Scorpio, and Stellio). We currently use Orion-LD for testing.

    • github
    • swagger > Note: -experimental flag need to be set for Orion-LD Context Broker to enable the full functionality. Check this issue for more information
  • IoT-Agents for managing IoT Devices. IoT agents are implemented using the FIWARE IoT Agent Node Lib as a common framework.

  • IoT-Agent-JSON for managing devices using a JSON message payload protocol format.

Example payload:

    {
        "humidity": "45%",
        "temperature": "23",
        "luminosity": "1570"
    }  
  • IoT-Agent-Ultralight for managing devices using an Ultralight 2.0 message payload protocol.

    Example payload:

    humidity|45%|temperature|23|luminosity|1570
    
  • QuantumLeap for the management of time series data

Structure of FiLiP

Library Structure

Documentation

We are still working on the documentation. You can find our current documentation here.

Running examples

Once you have installed the library, you can check the examples to learn how to use the different components.

Currently, we provide basic examples for the usage of FiLiP for the FIWARE GEs mentioned above. We suggest to start in the right order to first understand the configuration of clients. Afterwards, you can start modelling context data and interacting with the context broker and use its functionalities before you learn how to connect IoT Devices and store historic data.

Testing

We use unittests to write our test cases. To test the source code of the library in our CI workflow, the CI executes all tests located in the tests-directory and prefixed with test_ .

Contributing

Bug Reports & Feature Requests

The best way to report a bug or request a new feature is to open an issue. Please use one of the available issue templates and provide as much detail as possible.

Submitting Pull Requests

We warmly welcome code contributions! If you're planning to contribute, please first read our Contribution Guide for details on our development workflow, coding standards, and how to submit a pull request.

For other inquiries, you can still contact us via ebc-tools@eonerc.rwth-aachen.de.

Authors

Alumni

  • Jeff Reding
  • Felix Rehmann
  • Daniel Nikolay
  • Sebastian Blechmann

References

If you use FiLiP in your work, please cite the JOSS paper: bibtex @article{Storek2024, doi = {10.21105/joss.06953}, url = {https://doi.org/10.21105/joss.06953}, year = {2024}, publisher = {The Open Journal}, volume = {9}, number = {101}, pages = {6953}, author = {Storek, Thomas and Du, Junsong and Blechmann, Sebastian and Streblow, Rita and Müller, Dirk}, title = {FiLiP: A python software development kit (SDK) for accelerating the development of services based on FIWARE IoT platform}, journal = {Journal of Open Source Software} }

We also want to refer to publications that presented or applied the library:

  • S. Blechmann, I. Sowa, M. H. Schraven, R. Streblow, D. Müller & A. Monti. Open source platform application for smart building and smart grid controls. Automation in Construction 145 (2023), 104622. ISSN: 0926-5805. https://doi.org/10.1016/j.autcon.2022.104622

  • Haghgoo, M., Dognini, A., Storek, T., Plamanescu, R, Rahe, U., Gheorghe, S, Albu, M., Monti, A., Müller, D. (2021) A cloud-based service-oriented architecture to unlock smart energy services https://www.doi.org/10.1186/s42162-021-00143-x

  • Baranski, M., Storek, T. P. B., Kümpel, A., Blechmann, S., Streblow, R., Müller, D. et al., (2020). National 5G Energy Hub : Application of the Open-Source Cloud Platform FIWARE for Future Energy Management Systems. https://doi.org/10.18154/RWTH-2020-07876

  • T. Storek, J. Lohmöller, A. Kümpel, M. Baranski & D. Müller (2019). Application of the open-source cloud platform FIWARE for future building energy management systems. Journal of Physics: Conference Series, 1343, 12063. https://doi.org/10.1088/1742-6596/1343/1/012063

License

This project is licensed under the BSD License - see the LICENSE file for details.

Copyright

EBC

2021-2025, RWTH Aachen University, E.ON Energy Research Center, Institute for Energy Efficient Buildings and Indoor Climate

Institute for Energy Efficient Buildings and Indoor Climate (EBC)
E.ON Energy Research Center (E.ON ERC)
RWTH University Aachen, Germany

Disclaimer

This project is part of the cooperation between the RWTH Aachen University and the Research Centre Jülich.

JARA 
ENERGY

Related projects

National 5G Energy Hub

FISMEP

Acknowledgments

We gratefully acknowledge the financial support of the Federal Ministry
for Economic Affairs and Climate Action (BMWK), promotional references 03ET1495A, 03ET1551A, 0350018A, 03ET1561B, 03EN1030B.

BMWK

This project has received funding in the framework of the joint programming initiative ERA-Net Smart Grids Plus, with support from the European Union’s Horizon 2020 research and innovation programme.

ERANET

Owner

  • Name: RWTH Aachen University - E.ON Energy Research Center - Institute for Energy Efficient Buildings and Indoor Climate
  • Login: RWTH-EBC
  • Kind: organization
  • Email: david.jansen@eonerc.rwth-aachen.de
  • Location: RWTH Aachen University, Aachen, Germany

JOSS Publication

FiLiP: A python software development kit (SDK) for accelerating the development of services based on FIWARE IoT platform
Published
September 10, 2024
Volume 9, Issue 101, Page 6953
Authors
Thomas Storek ORCID
Institute for Energy Efficient Buildings and Indoor Climate, RWTH Aachen University, Germany, Drees & Sommer SE, Germany
Junsong Du ORCID
Institute for Energy Efficient Buildings and Indoor Climate, RWTH Aachen University, Germany
Sebastian Blechmann ORCID
Institute for Energy Efficient Buildings and Indoor Climate, RWTH Aachen University, Germany
Rita Streblow ORCID
Institute for Energy Efficient Buildings and Indoor Climate, RWTH Aachen University, Germany
Dirk Müller ORCID
Institute for Energy Efficient Buildings and Indoor Climate, RWTH Aachen University, Germany
Editor
Sarath Menon ORCID
Tags
IoT API client Pydantic Platform Semantic

GitHub Events

Total
  • Create event: 66
  • Release event: 6
  • Issues event: 94
  • Watch event: 1
  • Delete event: 49
  • Member event: 3
  • Issue comment event: 94
  • Push event: 395
  • Pull request review comment event: 48
  • Pull request review event: 87
  • Pull request event: 91
  • Fork event: 1
Last Year
  • Create event: 66
  • Release event: 6
  • Issues event: 94
  • Watch event: 1
  • Delete event: 49
  • Member event: 3
  • Issue comment event: 94
  • Push event: 395
  • Pull request review comment event: 48
  • Pull request review event: 87
  • Pull request event: 91
  • Fork event: 1

Committers

Last synced: 5 months ago

All Time
  • Total Commits: 2,201
  • Total Committers: 40
  • Avg Commits per committer: 55.025
  • Development Distribution Score (DDS): 0.737
Past Year
  • Commits: 477
  • Committers: 15
  • Avg Commits per committer: 31.8
  • Development Distribution Score (DDS): 0.409
Top Committers
Name Email Commits
JunsongDu j****u@e****e 579
Thomas Storek t****k@e****e 575
Reding Jeff j****g@r****e 253
Felix Rehmann F****n@r****e 149
Bhavdeep Singh Krishnawat b****t@r****e 94
Iris Koester i****r@e****e 77
Saira Bano s****o@e****e 67
thomas.storek t****k@r****e 54
Trgovac r****4@h****m 37
SystemsPurge n****f@g****m 36
SystemsPurge n****f@p****e 36
j.azzam j****m@f****e 34
Matthias Teupel m****l@r****e 31
Ubuntu u****u@n****e 26
Trgovac m****r@e****e 23
Marwa m****e@e****e 20
mwr m****i@e****e 14
fabian.wuellhorst f****t@r****e 13
FelixStege f****n@r****e 11
dnikolay-ebc d****y@r****e 9
Sebastian.Borges S****s@r****e 7
m.oden m****n@f****e 6
Ubuntu l****h@e****e 6
Alexander a****l@e****e 6
Sebastian Blechmann 5****n 5
tzu-chen.liu t****u@r****e 5
fabian.wuellhorst f****t@e****e 4
Matthias teupel m****l@g****m 4
Martin Altenburger m****r@t****e 3
Steffen Vogel p****t@s****e 3
and 10 more...

Issues and Pull Requests

Last synced: 4 months ago

All Time
  • Total issues: 186
  • Total pull requests: 260
  • Average time to close issues: 3 months
  • Average time to close pull requests: about 1 month
  • Total issue authors: 37
  • Total pull request authors: 24
  • Average comments per issue: 1.5
  • Average comments per pull request: 1.22
  • Merged pull requests: 203
  • Bot issues: 0
  • Bot pull requests: 13
Past Year
  • Issues: 63
  • Pull requests: 111
  • Average time to close issues: 28 days
  • Average time to close pull requests: 11 days
  • Issue authors: 13
  • Pull request authors: 10
  • Average comments per issue: 0.89
  • Average comments per pull request: 0.54
  • Merged pull requests: 76
  • Bot issues: 0
  • Bot pull requests: 13
Top Authors
Issue Authors
  • djs0109 (78)
  • tstorek (36)
  • sbanoeon (7)
  • RedingJeff (6)
  • FWuellhorst (6)
  • RCX112 (5)
  • windrad6 (4)
  • Maghnie (4)
  • mwr-ebc (4)
  • hannahgoerigk (3)
  • SystemsPurge (3)
  • JRadebold (2)
  • lidiawestphal (2)
  • WaltherTrgovac (2)
  • SBlechmann (2)
Pull Request Authors
  • djs0109 (118)
  • tstorek (38)
  • SystemsPurge (24)
  • sbanoeon (22)
  • dependabot[bot] (13)
  • RCX112 (8)
  • FWuellhorst (8)
  • WaltherTrgovac (6)
  • mwr-ebc (4)
  • RedingJeff (3)
  • FelixStege (2)
  • Bhavdeep13 (2)
  • sjohnen (2)
  • j-pick (2)
  • windrad6 (2)
Top Labels
Issue Labels
feature request (73) bug (69) NGSI-LD (23) enhancement (12) release (9) good first issue (6) documentation (5) question (4) help wanted (1) duplicate (1) invalid (1)
Pull Request Labels
dependencies (13) NGSI-LD (12) bug (10) feature request (7) release (2) documentation (1) enhancement (1) python (1)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 1,181 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 1
  • Total versions: 16
  • Total maintainers: 1
pypi.org: filip

[FI]WARE [Li]brary for [P]ython

  • Versions: 16
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 1,181 Last month
Rankings
Dependent packages count: 10.1%
Forks count: 10.9%
Average: 14.3%
Stargazers count: 14.5%
Downloads: 14.5%
Dependent repos count: 21.6%
Maintainers (1)
Last synced: 4 months ago

Dependencies

docs/requirements.txt pypi
  • autodoc-pydantic >=1.4.0
  • m2r2 >=0.3.1
  • sphinx >=4.2
  • sphinx-autobuild >=2021.3.14
  • sphinx-rtd-theme >=0.5.2
requirements.txt pypi
  • aenum >=3.0.0
  • datamodel_code_generator >=0.11.16
  • igraph ==0.9.8
  • matplotlib >=3.5.1
  • numpy >=1.21
  • paho-mqtt >=1.6.1
  • pandas >=1.2.0
  • pandas_datapackage_reader >=0.18.0
  • pathlib >=1.0.1
  • pydantic >=1.8.1
  • python-Levenshtein >=0.12.2
  • python-dateutil >=2.8.2
  • python-dotenv >=0.19.1
  • pytz >=2019.1
  • rapidfuzz >=1.7.1
  • rdflib *
  • regex >=2021.3.17
  • requests >=2.23.0
  • setuptools >=40.6.0
  • stringcase >=1.2.0
  • wget >=3.2
tutorials/ngsi_v2/requirements.txt pypi
  • matplotlib >=3.4.3
.github/workflows/issue-tracker.yml actions
  • robvanderleek/create-issue-branch main composite
setup.py pypi