Skip to main content

Library to integrate Wirepas NMS metadata service APIs

Project description

NMS Integration Tool

image image image Actions status

This python package imports location, network, node, and gateway data into the associated Wirepas NMS backend metadata services.

Repository Organization

Python Package

The nms_integration_tool package is organized as follows:

  • src/nms_integration_tool/
    • api/ - OpenAPI generated NMS Metadata Service API Python libraries to connect to and query services.
    • <service name>/ - Contains requester/transformer module implementations for importing data to each service
    • data_source.py - Provides classes to extract data from various data sources. These classes provide an ingest method that returns a list of data items. Future data sources can be implemented using the DataSource interface.
    • transformer.py file defines a template class with methods to ingest data from any data source. Each child class must provide a specific implementation detailing how input data is transformed into a format compatible with the metadata APIs. The class provides methods that return a list of transformed data items. Transformed data are represented as dictionaries with keys corresponding to the fields of the associated metadata service objects, which can then be sent to the import module.
    • requester.py file provides an interface class to import data and update existing database records. Each service must implement the main function in its own child class inheriting from this interface. The import_data method imports new data and updates existing records in the database. An optional cache can be provided to store data from service responses.

Classes are provided for importing locations, location types, networks, nodes, and gateway metadata.

Note: For gateway, node, and location services, data with coordinates may be automatically updated with no actual changes. This occurs because services return non-identical data (the EPSG field is added to coordinates, and floating-point approximation errors can occur when comparing data source values with queried data). The import module detects these differences and updates records without modifying any fields, which may cause a small delay in POST queries.

WNT Metadata Exporter

Helper script to import metadata from WNT to NMS: wnt_metadata_exporter.md

Example Scripts

data_import.md

Helper script to import data from file sources to NMS with example configs to map data with NMS schemas.

postgres_import.md

Basic and exemplary data importer from Postgres database to NMS.


Requirements

  • uv (recommended package manager)

Module Configuration

Create a virtual environment and install the package using uv:

# Create venv and install package with all runtime dependencies
uv sync

# Install with examples dependencies (e.g. for running examples)
uv sync --extra examples

# or for all dependencies
uv sync --all-extras

# Install in editable mode for local development
uv pip install -e .

Installation

PyPI Installation

pip install nms-integration-tool

Local Installation

# Install in editable mode for local development
uv pip install -e .

LICENSE


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

nms_integration_tool-1.3.0.2.tar.gz (134.3 kB view details)

Uploaded Source

Built Distribution

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

nms_integration_tool-1.3.0.2-py3-none-any.whl (324.5 kB view details)

Uploaded Python 3

File details

Details for the file nms_integration_tool-1.3.0.2.tar.gz.

File metadata

  • Download URL: nms_integration_tool-1.3.0.2.tar.gz
  • Upload date:
  • Size: 134.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.12 {"installer":{"name":"uv","version":"0.10.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for nms_integration_tool-1.3.0.2.tar.gz
Algorithm Hash digest
SHA256 69b5e325210bce676e7dddb21ccc311a18450761c2186bce7ce148f30478ee09
MD5 98117b9ca4092907d36f91a7a3946754
BLAKE2b-256 9560ae92e962025cd314ef11cc99d2e625a12b438a126c55e574e2d94a76c566

See more details on using hashes here.

File details

Details for the file nms_integration_tool-1.3.0.2-py3-none-any.whl.

File metadata

  • Download URL: nms_integration_tool-1.3.0.2-py3-none-any.whl
  • Upload date:
  • Size: 324.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.12 {"installer":{"name":"uv","version":"0.10.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for nms_integration_tool-1.3.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 38c5d75030f19c3159e1cea786263792f1fdb123eaf5e32d5b97c18a42acc0ce
MD5 c92b6699a915d3d0559a0fa07132eda8
BLAKE2b-256 8426dd092d9f729008969738c95ffdaf3bb14bf7125eeb8f7181a355092ab540

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