aei-3gpp-kpi-validator
aei-3gpp-kpi-validator is a Python library for validating LTE/5G telecom KPIs - RSRP, RSRQ, SINR, handover quality, and NB-IoT power - against their real 3GPP-standard valid ranges. Every check cites the exact 3GPP TS number and section it comes from, and the library stays dependency-light: pandas, pydantic, and PyYAML are the only hard requirements, with Dask available as an optional accelerated path.
Status & roadmap
v0.1.0 is the first installable public release of this library - not a
pre-release, not an incomplete package. Semver's 0.x range is the standard
way to signal initial development, not a hedge about readiness. Scope
evolves through normal versioned releases, the same way
aei-geo-features
has grown, as real-world usage and telecom feedback inform future
development.
Why this exists
Most public "telecom KPI" tooling either doesn't cite a standard at all, or implies far more standards coverage than it actually implements. This project does the opposite on purpose: everything it validates is tied to a real 3GPP TS number and section (see the table below), and everything it does not implement is listed explicitly in "What this deliberately does not do," rather than silently absent.
This project is separate from, and does not include, any part of AID Edge Inc.'s proprietary Velorona telecom and decision-intelligence capabilities. It contains only standards-derived range validation - no degradation scoring, no detection logic, no customer- or deployment-specific thresholds of any kind.
Who this is for
Telecom data engineers, RF/network engineers, and data scientists working with LTE/5G KPI data who need a lightweight, standards-cited sanity check before analytics or model training - not a full network-management-system replacement.
Useful for:
- Range-validating RSRP/RSRQ/SINR columns in a pandas (or optionally Dask) DataFrame before feeding them into a pipeline.
- Gating rows on TS 36.331-derived handover-quality timing and TS 36.213-derived NB-IoT power-saving parameters.
- A starting point for teams who want KPI validation logic they can read, audit, and extend themselves, rather than a black-box service.
Example use cases
- Pre-training data-quality gate for an ML pipeline consuming LTE/5G KPI exports.
- Catching malformed or out-of-spec RSRP/RSRQ/SINR values in an ETL job before they reach a dashboard.
- Filtering handover or NB-IoT power-saving event logs to standards-valid rows for further analysis.
- A citeable, inspectable reference for what "RSRP is out of range" or "handover passed the quality gate" actually means, per spec.
Install
pip install aei-3gpp-kpi-validator
Optional extras:
pip install "aei-3gpp-kpi-validator[dask]" # Dask-accelerated validation path
pip install "aei-3gpp-kpi-validator[metrics]" # Prometheus metrics adapter
Quick start
import pandas as pd
from aei_3gpp_kpi_validator import KPIValidator
validator = KPIValidator()
df = pd.DataFrame({"rsrp": [-145.0, -100.0, -50.0, -40.0]})
outcome = validator.validate_column(df, "rsrp")
print(outcome.out_of_range_count)
# 2 (-145.0 is below -140 dBm min; -40.0 is above -44 dBm max)
print(outcome.validated.tolist())
# [-140.0, -100.0, -50.0, -44.0] (clipped to the TS 36.214 valid range)
See examples/basic_usage.py for a complete, runnable example including
the handover and NB-IoT gates.
What is implemented
| KPI | 3GPP reference | Range | Units |
|---|---|---|---|
| RSRP | TS 36.214, Section 5.1 | -140 to -44 | dBm |
| RSRQ | TS 36.214, Section 5.1 | -20 to -3 | dB |
| SINR | TS 38.214, Section 5.1 | -20 to 30 | dB |
| Handover Quality | TS 36.331, Section 5.5 | 0 to 100 | percentage |
| NB-IoT Power | TS 36.213, Section 15.2 | 0 to 262144 | cycle |
validate_handover(df) enforces ho_preparation_time < 50 & ho_execution_time < 20
(TS 36.331-derived thresholds). validate_nbiot_power_profile(df) enforces
paging_cycle <= 256 & edrx_cycle <= 262144 (TS 36.213 §15.2 eDRX
cycle-length ceiling, 262144 = 2^18 radio frames). Both run on plain
pandas by default; Dask is an optional accelerated path using the
identical predicate string for both backends - see tests/test_validator.py's
*_pandas_dask_parity tests, which assert the two backends produce
identical validation decisions on the same input.
What this deliberately does not do
This library validates the five KPIs above and nothing else. That's a scope boundary drawn on purpose, not a gap to be filled later:
- CQI mapping (TS 38.214 §7.1.7.1) is out of scope. Many "CQI calculator" implementations in the wild - including an earlier internal prototype the authors are aware of - borrow the CQI name and a 1-15 numeric range without implementing the actual 3GPP CQI table (modulation scheme, code rate, spectral efficiency per index). Rather than risk that mistake, this library makes no CQI claim at all.
- RedCap is excluded, but worth a correction while we're here: the real 3GPP reference is TR 38.875 ("Study on support of reduced capability NR devices," Release 17). If you've seen TR 38.888 cited for RedCap elsewhere, that number actually belongs to "Adding wider channel bandwidth in NR band n28" - unrelated. Verify any RedCap reference against the official 3GPP specification portal before relying on it.
- Ambient IoT (TR 22.840 / TR 38.848), Outage/Latency KPIs (TS 28.552 / TS 23.503), IoT Security/SUCI (TS 33.501 / ETSI TS 103 457), and PTCRB/GCF certification alignment are all left out. No certification or compliance claim is made anywhere in this project.
- Generic infrastructure - Kafka/DLQ messaging, Vault-style encrypted config, circuit-breaker/retry logic, FastAPI serving, STL-based anomaly detection - was never part of this library's job and isn't included.
None of the above is "not yet implemented." It's outside what a 3GPP KPI validator should be responsible for, and no "production-ready," "enterprise-grade," FIPS, SOC 2, or GDPR claim is made anywhere in this project.
Public API
| Function / value | Purpose |
|---|---|
KPIValidator(config_path=...) |
Loads YAML KPI configs and validates DataFrame columns against them. |
KPIValidator.validate_column(df, kpi_name, data_source="unknown") |
Range-clip validation against the KPI's configured min/max. Returns a ValidationOutcome. |
KPIValidator.validate_handover(df) |
TS 36.331 handover-quality gate. Pandas by default, Dask-accelerated if given a Dask DataFrame. |
KPIValidator.validate_nbiot_power_profile(df) |
TS 36.213 §15.2 NB-IoT power-saving gate. Pandas by default, Dask-accelerated if given a Dask DataFrame. |
ValidationOutcome |
Dataclass: kpi_name, data_source, gpp3_version, validated, out_of_range_count, latency_seconds. |
KPIStandard, Standard, ValidRange |
Pydantic schema for a KPI's standards metadata and valid range - the shape every shipped YAML config follows. |
ConfigurationError |
Raised for KPI configuration load/schema errors. |
aei_3gpp_kpi_validator.metrics.KPIMetricsAdapter |
Optional, explicit Prometheus adapter - not imported by the package __init__, so importing the package never pulls in prometheus_client. Takes an injected CollectorRegistry; registration is idempotent per registry. |
Dependencies
Runtime (hard): pandas, pydantic, pyyaml. Optional: dask[dataframe]
(accelerates validate_handover/validate_nbiot_power_profile and
validate_column's clip step on large datasets - imported in a
try/except ImportError guard and falls back to pandas-only behavior when
absent); prometheus-client (only if you import
aei_3gpp_kpi_validator.metrics explicitly). See CHANGELOG.md for the
full dependency and license audit.
This library makes no network calls and reads no environment variables -
see tests/test_package_hygiene.py.
Security
See SECURITY.md for supported versions and how to report a vulnerability
privately. See docs/PUBLISHING.md for the release process: PyPI Trusted
Publishing with OIDC and no stored API token, registered for both PyPI
and TestPyPI.
Contributing
See CONTRIBUTING.md.
License
Apache License 2.0 - see LICENSE.
Copyright 2026 AID Edge Inc.
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 aei_3gpp_kpi_validator-0.1.1.tar.gz.
File metadata
- Download URL: aei_3gpp_kpi_validator-0.1.1.tar.gz
- Upload date:
- Size: 23.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7d8ef417943d2c02ef547cd135f63a870e81102c97ca32e73f691e30b1596284
|
|
| MD5 |
d502b058b0d1752c0a1b69459e1fa44d
|
|
| BLAKE2b-256 |
0878999ed5d9f2e09f05b5e923b053086f27bf129ed19e1eec0bc2ea57122b45
|
Provenance
The following attestation bundles were made for aei_3gpp_kpi_validator-0.1.1.tar.gz:
Publisher:
publish.yml on AIDEdgeInc-Lab/aei-3gpp-kpi-validator
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aei_3gpp_kpi_validator-0.1.1.tar.gz -
Subject digest:
7d8ef417943d2c02ef547cd135f63a870e81102c97ca32e73f691e30b1596284 - Sigstore transparency entry: 2712577480
- Sigstore integration time:
-
Permalink:
AIDEdgeInc-Lab/aei-3gpp-kpi-validator@6c28afb2d854cc9117b1d33df143ac729ff99fdd -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/AIDEdgeInc-Lab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@6c28afb2d854cc9117b1d33df143ac729ff99fdd -
Trigger Event:
release
-
Statement type:
File details
Details for the file aei_3gpp_kpi_validator-0.1.1-py3-none-any.whl.
File metadata
- Download URL: aei_3gpp_kpi_validator-0.1.1-py3-none-any.whl
- Upload date:
- Size: 17.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
50f2a8b07a6606cd4a4f84620a88714017ae4c751a21eb06dacb78b8524af10a
|
|
| MD5 |
e2ae92f1e755e8cbccefdcc7213b96ca
|
|
| BLAKE2b-256 |
f14752523e91887dbbe5afa9a38a95a666a09573cb96952afc9f5086c2712286
|
Provenance
The following attestation bundles were made for aei_3gpp_kpi_validator-0.1.1-py3-none-any.whl:
Publisher:
publish.yml on AIDEdgeInc-Lab/aei-3gpp-kpi-validator
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aei_3gpp_kpi_validator-0.1.1-py3-none-any.whl -
Subject digest:
50f2a8b07a6606cd4a4f84620a88714017ae4c751a21eb06dacb78b8524af10a - Sigstore transparency entry: 2712578736
- Sigstore integration time:
-
Permalink:
AIDEdgeInc-Lab/aei-3gpp-kpi-validator@6c28afb2d854cc9117b1d33df143ac729ff99fdd -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/AIDEdgeInc-Lab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@6c28afb2d854cc9117b1d33df143ac729ff99fdd -
Trigger Event:
release
-
Statement type: