SPADE-FIWARE-Artifacts
Documentation
Check out the documentation at: https://spade-fiware-artifacts.readthedocs.io
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
Configure Your Environment
Create a config.json file:
{ "XMPP_SERVER": "your.xmpp.server", "subscriber_artifact_name": "art_subscriber", "broker_port": "http://localhost:9090" }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" )
Metadata
Release files for spade-fiware-artifacts 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| spade-fiware-artifacts-0.1.2.tar.gz | 20.8 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| spade_fiware_artifacts-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 34.1 kB
Release files / spade-fiware-artifacts-0.1.2.tar.gz
| Download URL | spade-fiware-artifacts-0.1.2.tar.gz |
|---|---|
| Size | 20.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c6c5b1825efaba183c8b8a7527af3f40d63d3fd481ce485c0466f83dff2c55be
|
|
BLAKE2b-256 checksum How to use checksums |
5ece30b69793c3d98e7388b5c44ed724eff39a3a01cf22c982b666669c2d6b8a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.8.10
|
Release files / spade_fiware_artifacts-0.1.2-py3-none-any.whl
| Download URL | spade_fiware_artifacts-0.1.2-py3-none-any.whl |
|---|---|
| Size | 13.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
08253b5f425c763b774448a30282552377fdfef74e923c4ba1065ed75d9f139f
|
|
BLAKE2b-256 checksum How to use checksums |
e2cdc0125fe6d69d6496e2f5b67ba2eca3aabe862d1e5d0e8ec8b4b645788bf8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.8.10
|
Security for spade-fiware-artifacts 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.