spade-fiware-artifacts


Namespade-fiware-artifacts JSON
Version 0.1.2 PyPI version JSON
download
home_pagehttps://github.com/sosanzma/SPADE-FIWARE-Artifacts
SummaryA toolkit for multi-agent systems to interact with FIWARE's context management system
upload_time2024-11-18 09:18:08
maintainerNone
docs_urlNone
authorManel Soler Sanz
requires_python>=3.8
licenseMIT License
keywords spade-fiware-artifacts
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            SPADE-FIWARE-Artifacts
=======================

Documentation
-------------
Check out the  documentation at: https://spade-fiware-artifacts.readthedocs.io

.. image:: https://readthedocs.org/projects/spade-fiware-artifacts/badge/?version=latest
    :target: https://spade-fiware-artifacts.readthedocs.io/en/latest/?badge=latest
    :alt: Documentation Status

.. image:: https://img.shields.io/github/actions/workflow/status/sosanzma/spade-fiware-artifacts/python-app.yml
    :target: https://github.com/sosanzma/spade-fiware-artifacts/actions
    :alt: Build Status

.. image:: https://coveralls.io/repos/github/sosanzma/SPADE-FIWARE-Artifacts/badge.svg
    :target: https://coveralls.io/github/sosanzma/SPADE-FIWARE-Artifacts

.. image:: https://img.shields.io/pypi/v/spade-fiware-artifacts
    :target: https://pypi.org/project/spade-fiware-artifacts/
    :alt: PyPI Version

Overview
--------

SPADE-FIWARE-Artifacts is a Python library that bridges SPADE (Smart Python Agent Development Environment) with FIWARE Context Brokers. It provides a toolkit for multi-agent systems to interact with FIWARE's context management system, supporting both Orion and Scorpio Context Brokers through NGSI-LD.

Key Features
------------

- **NGSI-LD Support**: Full compatibility with FIWARE's NGSI-LD API
- **Asynchronous Operations**: Built on asyncio for efficient non-blocking operations
- **Flexible Data Processing**: Customizable data transformation and handling
- **Configurable JSON Templates**: Allows customized JSON templates for data structuring and flexible formatting.

Core Components
---------------

InserterArtifact
~~~~~~~~~~~~~~~~

A component for managing entity data in FIWARE Context Brokers:

- **Entity Management**:
  - Create new entities with complex attributes
  - Update existing entities (full or partial updates)
  - Handle different attribute types (Properties, GeoProperties, Relationships)

Example usage::

    inserter = InserterArtifact(
        jid="inserter@xmpp.server",
        passwd="password",
        publisher_jid="publisher@xmpp.server",
        host="broker.example.com",
        project_name="my_project"
    )

SubscriptionManagerArtifact
~~~~~~~~~~~~~~~~~~~~~~~~~~~

Manages subscriptions and handles notifications from the Context Broker:

- **Subscription Features**:
  - Create and manage NGSI-LD subscriptions
  - Monitor specific entity attributes under specific conditions
  - Handle subscription lifecycle (create, update, delete)

Example usage::

    subscription_manager = SubscriptionManagerArtifact(
        jid="subscriber@xmpp.server",
        passwd="password",
        config=config_payload,
        broker_url="http://broker.example.com:9090"
    )

where::

    config_payload = {
        "entity_type": "WasteContainer",
        "entity_id": "088",
        "watched_attributes": [],
        "q_filter": "fillingLevel>0.7",
        "context": [
            "https://raw.githubusercontent.com/smart-data-models/dataModel.WasteManagement/master/context.jsonld"
        ],
        "delete_all_artefact_subscriptions": true,
        "delete_subscription_identifier": "subs_1",
        "subscription_identifier": "subs_2",
        "delete_only": false
    }

Installation
------------

Install via pip::

    pip install spade-fiware-artifacts

Quick Start
-----------

1. **Configure Your Environment**

   Create a `config.json` file::

       {
           "XMPP_SERVER": "your.xmpp.server",
           "subscriber_artifact_name": "art_subscriber",
           "broker_port": "http://localhost:9090"
       }

2. **Initialize Artifacts**

   .. code-block:: python

       from spade_fiware_artifacts import InserterArtifact, SubscriptionManagerArtifact

       inserter = InserterArtifact(
           jid="inserter@xmpp.server",
           passwd="password",
           publisher_jid="publisher@xmpp.server",
           host="localhost",
           project_name="test_project"
       )

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/sosanzma/SPADE-FIWARE-Artifacts",
    "name": "spade-fiware-artifacts",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "spade-fiware-artifacts",
    "author": "Manel Soler Sanz",
    "author_email": "manelbng@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/5e/ce/30b69793c3d98e7388b5c44ed724eff39a3a01cf22c982b666669c2d6b8a/spade-fiware-artifacts-0.1.2.tar.gz",
    "platform": null,
    "description": "SPADE-FIWARE-Artifacts\r\n=======================\r\n\r\nDocumentation\r\n-------------\r\nCheck out the  documentation at: https://spade-fiware-artifacts.readthedocs.io\r\n\r\n.. image:: https://readthedocs.org/projects/spade-fiware-artifacts/badge/?version=latest\r\n    :target: https://spade-fiware-artifacts.readthedocs.io/en/latest/?badge=latest\r\n    :alt: Documentation Status\r\n\r\n.. image:: https://img.shields.io/github/actions/workflow/status/sosanzma/spade-fiware-artifacts/python-app.yml\r\n    :target: https://github.com/sosanzma/spade-fiware-artifacts/actions\r\n    :alt: Build Status\r\n\r\n.. image:: https://coveralls.io/repos/github/sosanzma/SPADE-FIWARE-Artifacts/badge.svg\r\n    :target: https://coveralls.io/github/sosanzma/SPADE-FIWARE-Artifacts\r\n\r\n.. image:: https://img.shields.io/pypi/v/spade-fiware-artifacts\r\n    :target: https://pypi.org/project/spade-fiware-artifacts/\r\n    :alt: PyPI Version\r\n\r\nOverview\r\n--------\r\n\r\nSPADE-FIWARE-Artifacts is a Python library that bridges SPADE (Smart Python Agent Development Environment) with FIWARE Context Brokers. It provides a toolkit for multi-agent systems to interact with FIWARE's context management system, supporting both Orion and Scorpio Context Brokers through NGSI-LD.\r\n\r\nKey Features\r\n------------\r\n\r\n- **NGSI-LD Support**: Full compatibility with FIWARE's NGSI-LD API\r\n- **Asynchronous Operations**: Built on asyncio for efficient non-blocking operations\r\n- **Flexible Data Processing**: Customizable data transformation and handling\r\n- **Configurable JSON Templates**: Allows customized JSON templates for data structuring and flexible formatting.\r\n\r\nCore Components\r\n---------------\r\n\r\nInserterArtifact\r\n~~~~~~~~~~~~~~~~\r\n\r\nA component for managing entity data in FIWARE Context Brokers:\r\n\r\n- **Entity Management**:\r\n  - Create new entities with complex attributes\r\n  - Update existing entities (full or partial updates)\r\n  - Handle different attribute types (Properties, GeoProperties, Relationships)\r\n\r\nExample usage::\r\n\r\n    inserter = InserterArtifact(\r\n        jid=\"inserter@xmpp.server\",\r\n        passwd=\"password\",\r\n        publisher_jid=\"publisher@xmpp.server\",\r\n        host=\"broker.example.com\",\r\n        project_name=\"my_project\"\r\n    )\r\n\r\nSubscriptionManagerArtifact\r\n~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n\r\nManages subscriptions and handles notifications from the Context Broker:\r\n\r\n- **Subscription Features**:\r\n  - Create and manage NGSI-LD subscriptions\r\n  - Monitor specific entity attributes under specific conditions\r\n  - Handle subscription lifecycle (create, update, delete)\r\n\r\nExample usage::\r\n\r\n    subscription_manager = SubscriptionManagerArtifact(\r\n        jid=\"subscriber@xmpp.server\",\r\n        passwd=\"password\",\r\n        config=config_payload,\r\n        broker_url=\"http://broker.example.com:9090\"\r\n    )\r\n\r\nwhere::\r\n\r\n    config_payload = {\r\n        \"entity_type\": \"WasteContainer\",\r\n        \"entity_id\": \"088\",\r\n        \"watched_attributes\": [],\r\n        \"q_filter\": \"fillingLevel>0.7\",\r\n        \"context\": [\r\n            \"https://raw.githubusercontent.com/smart-data-models/dataModel.WasteManagement/master/context.jsonld\"\r\n        ],\r\n        \"delete_all_artefact_subscriptions\": true,\r\n        \"delete_subscription_identifier\": \"subs_1\",\r\n        \"subscription_identifier\": \"subs_2\",\r\n        \"delete_only\": false\r\n    }\r\n\r\nInstallation\r\n------------\r\n\r\nInstall via pip::\r\n\r\n    pip install spade-fiware-artifacts\r\n\r\nQuick Start\r\n-----------\r\n\r\n1. **Configure Your Environment**\r\n\r\n   Create a `config.json` file::\r\n\r\n       {\r\n           \"XMPP_SERVER\": \"your.xmpp.server\",\r\n           \"subscriber_artifact_name\": \"art_subscriber\",\r\n           \"broker_port\": \"http://localhost:9090\"\r\n       }\r\n\r\n2. **Initialize Artifacts**\r\n\r\n   .. code-block:: python\r\n\r\n       from spade_fiware_artifacts import InserterArtifact, SubscriptionManagerArtifact\r\n\r\n       inserter = InserterArtifact(\r\n           jid=\"inserter@xmpp.server\",\r\n           passwd=\"password\",\r\n           publisher_jid=\"publisher@xmpp.server\",\r\n           host=\"localhost\",\r\n           project_name=\"test_project\"\r\n       )\r\n",
    "bugtrack_url": null,
    "license": "MIT License",
    "summary": "A toolkit for multi-agent systems to interact with FIWARE's context management system",
    "version": "0.1.2",
    "project_urls": {
        "Homepage": "https://github.com/sosanzma/SPADE-FIWARE-Artifacts"
    },
    "split_keywords": [
        "spade-fiware-artifacts"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e2cdc0125fe6d69d6496e2f5b67ba2eca3aabe862d1e5d0e8ec8b4b645788bf8",
                "md5": "9cab074a1337ae3a6b349a4f0928f433",
                "sha256": "08253b5f425c763b774448a30282552377fdfef74e923c4ba1065ed75d9f139f"
            },
            "downloads": -1,
            "filename": "spade_fiware_artifacts-0.1.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "9cab074a1337ae3a6b349a4f0928f433",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 13324,
            "upload_time": "2024-11-18T09:18:07",
            "upload_time_iso_8601": "2024-11-18T09:18:07.351965Z",
            "url": "https://files.pythonhosted.org/packages/e2/cd/c0125fe6d69d6496e2f5b67ba2eca3aabe862d1e5d0e8ec8b4b645788bf8/spade_fiware_artifacts-0.1.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5ece30b69793c3d98e7388b5c44ed724eff39a3a01cf22c982b666669c2d6b8a",
                "md5": "ecf9a129303a125e90adb98fc0b9d44d",
                "sha256": "c6c5b1825efaba183c8b8a7527af3f40d63d3fd481ce485c0466f83dff2c55be"
            },
            "downloads": -1,
            "filename": "spade-fiware-artifacts-0.1.2.tar.gz",
            "has_sig": false,
            "md5_digest": "ecf9a129303a125e90adb98fc0b9d44d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 20790,
            "upload_time": "2024-11-18T09:18:08",
            "upload_time_iso_8601": "2024-11-18T09:18:08.617349Z",
            "url": "https://files.pythonhosted.org/packages/5e/ce/30b69793c3d98e7388b5c44ed724eff39a3a01cf22c982b666669c2d6b8a/spade-fiware-artifacts-0.1.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-18 09:18:08",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "sosanzma",
    "github_project": "SPADE-FIWARE-Artifacts",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "tox": true,
    "lcname": "spade-fiware-artifacts"
}
        
Elapsed time: 1.50192s