Library to integrate Wirepas NMS metadata service APIs
Project description
NMS Integration Tool
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
ingestmethod that returns a list of data items. Future data sources can be implemented using theDataSourceinterface. - 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_datamethod 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==<NMS VERSION>.*
# For NMS version 1.3.0: pip install nms-integration-tool==1.3.0.*
Local Installation
# Install in editable mode for local development
uv pip install -e .
LICENSE
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nms_integration_tool-1.3.0.3.tar.gz.
File metadata
- Download URL: nms_integration_tool-1.3.0.3.tar.gz
- Upload date:
- Size: 134.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.0 {"installer":{"name":"uv","version":"0.11.0","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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ca88ef4948b50b2c47338697bf1b966eda54a66a7d0b7ba04bdb58f8b8ea18ef
|
|
| MD5 |
61c9ad37e9616590040ad51a744f637f
|
|
| BLAKE2b-256 |
4ff1fc57a26d50ae2691e18a6b71ebc22d84415d3f8cfaa484c73c9465c4fa3e
|
File details
Details for the file nms_integration_tool-1.3.0.3-py3-none-any.whl.
File metadata
- Download URL: nms_integration_tool-1.3.0.3-py3-none-any.whl
- Upload date:
- Size: 324.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.0 {"installer":{"name":"uv","version":"0.11.0","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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ea752b9bc154cc858244c964fe2245f3a3829b9bf9a40ef6a679b4604d54fa35
|
|
| MD5 |
df33b7fa734150a7799a7a82648f77b4
|
|
| BLAKE2b-256 |
bad2d24d7b572261c50c61e3545828b29ca7d72c4dbc0e8f34f93a6999539c71
|