Skip to main content

A toolkit for multi-agent systems to interact with FIWARE's context management system

Reason this release was yanked:

dependencies error

Project description

Documentation

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

Documentation Status Build Status https://coveralls.io/repos/github/sosanzma/SPADE-FIWARE-Artifacts/badge.svg 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

    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"
    )

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

spade-fiware-artifacts-0.1.1.tar.gz (20.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

spade_fiware_artifacts-0.1.1-py3-none-any.whl (13.3 kB view details)

Uploaded Python 3

File details

Details for the file spade-fiware-artifacts-0.1.1.tar.gz.

File metadata

  • Download URL: spade-fiware-artifacts-0.1.1.tar.gz
  • Upload date:
  • Size: 20.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.8.10

File hashes

Hashes for spade-fiware-artifacts-0.1.1.tar.gz
Algorithm Hash digest
SHA256 c1a36977d4c92c6b3d5026c409a6588fc36c71dbb9875b0482f0730d9631750a
MD5 1c67beeca1d8f62ef60fdd905552e906
BLAKE2b-256 866dfa9c61e65a232784a66adec0679210ebfb88f9c5d353a0eb5c4f78b319e5

See more details on using hashes here.

File details

Details for the file spade_fiware_artifacts-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for spade_fiware_artifacts-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 07016f8d8cbb67f18a7757897a4c4c72870ca9c0880940c1c55e7c0efd697dab
MD5 333bad0fd9225836946d212200c1aa44
BLAKE2b-256 7dac84260f593afdb2b3d95dffc8f85ba761b5c8a8343fb2d916bbf41b2ca178

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page