Metadata-Version: 2.4
Name: airpuls-ric-sdk
Version: 0.3.3.dev64
Summary: Python bindings for the airpuls Near-RT RIC xApp client library (libric-client) — Linux x86_64 and aarch64.
Author: airpuls GmbH
License-Expression: Apache-2.0
Project-URL: Homepage, https://airpuls.de
Keywords: oran,ric,near-rt-ric,xapp,e2ap,e2sm-kpm
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Telecommunications Industry
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: System :: Networking
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: NOTICE
License-File: LICENSES/BSD-2-Clause.txt
License-File: LICENSES/bundled/glib-networking/COPYING
License-File: LICENSES/bundled/glib2/COPYING
License-File: LICENSES/bundled/gnutls/COPYING
License-File: LICENSES/bundled/gnutls/COPYING.LESSERv2
License-File: LICENSES/bundled/libffi/LICENSE
License-File: LICENSES/bundled/libidn2/COPYING
License-File: LICENSES/bundled/libidn2/COPYING.LESSERv3
License-File: LICENSES/bundled/libidn2/COPYING.unicode
License-File: LICENSES/bundled/libidn2/COPYINGv2
License-File: LICENSES/bundled/libmount/COPYING
License-File: LICENSES/bundled/libmount/COPYING.LGPL-2.1-or-later
License-File: LICENSES/bundled/libselinux/LICENSE
License-File: LICENSES/bundled/libtasn1/COPYING
License-File: LICENSES/bundled/libtasn1/COPYING.LESSER
License-File: LICENSES/bundled/libtasn1/LICENSE
License-File: LICENSES/bundled/libunistring/COPYING
License-File: LICENSES/bundled/libunistring/COPYING.LIB
License-File: LICENSES/bundled/libyaml/License
License-File: LICENSES/bundled/nettle/COPYING.LESSERv3
License-File: LICENSES/bundled/nettle/COPYINGv2
License-File: LICENSES/bundled/p11-kit/COPYING
License-File: LICENSES/bundled/pcre/COPYING
License-File: LICENSES/bundled/pcre/LICENCE
License-File: LICENSES/bundled/pcre2/COPYING
License-File: LICENSES/bundled/pcre2/LICENCE
License-File: LICENSES/cjson/LICENSE
Requires-Dist: cffi>=1.15.0
Requires-Dist: redis>=5.0
Provides-Extra: rrc
Requires-Dist: pycrate>=0.7; extra == "rrc"
Provides-Extra: test
Requires-Dist: pytest>=7.0; extra == "test"
Requires-Dist: pytest-cov; extra == "test"
Requires-Dist: fakeredis>=2.20; extra == "test"
Requires-Dist: httpx; extra == "test"
Dynamic: license-file

# airpuls-ric-sdk

Python xApp SDK for the **airpuls Near-RT RIC** — a clean-room,
spec-compliant O-RAN E2 implementation.

The package wraps the native `libric-client` xApp client library in a
Pythonic API.  The binary wheel is self-contained: the native client,
the E2SM codecs, and their shared-library dependencies are bundled, so
`pip install` needs no compiler and no system packages.

## Supported platform

- **OS / architecture:** Linux x86_64 and aarch64, glibc ≥ 2.34
  (Ubuntu 22.04+, Debian 12+, RHEL/Alma/Rocky 9+)
- **Python:** CPython ≥ 3.9 (one `abi3` wheel covers all versions)

Other platforms are not supported at this time.

## Install

```bash
pip install airpuls-ric-sdk
```

The distribution is named `airpuls-ric-sdk`; the import stays

```python
import airpuls_ric_sdk
```

## What you get

- **E2 node discovery** — node available/lost/capabilities-changed
  callbacks, RAN Function inspection by ID or OID.
- **Six service models** — KPM, RC, LLC, AIR, CCC, and EPI, each with
  typed subscription builders and indication decoding.
- **Subscribe / Indication / Control / Query** — periodic and
  event-triggered REPORT subscriptions, INSERT indications with
  CONTROL answers, synchronous and asynchronous RIC Control, RC QUERY.
- **`BaseXApp`** — batteries-included xApp base class: connect,
  reconnect with backoff, SM registration, signal handling, event
  loop (blocking `run_sync()` or asyncio `run()`).
- **Telemetry sinks** — declarative fan-out of measurements and
  events to Redis and InfluxDB, configured from `xapp.yml`.

## Quick start

An xApp reads its parameters from a YAML config file:

```yaml
# my-xapp.yml
ric:
  endpoint: "tcp://192.168.2.96:36422"   # xApp IPC endpoint of the RIC

xapp:
  deployment_name: "my-xapp"
```

```python
from airpuls_ric_sdk import kpm_plugin_get, KPM_RAN_FUNC_ID
from airpuls_ric_sdk.xapp import BaseXApp, setup_logging

class MyXApp(BaseXApp):
    XAPP_TYPE = "my-xapp"
    XAPP_VERSION = "1.0.0"

    def plugins(self):
        return [kpm_plugin_get()]

    def on_e2_node_available(self, client, node):
        # Build and send a KPM subscription here.
        ...

    def on_indication(self, client, sub_id, node, ran_func_id, header, data):
        if ran_func_id != KPM_RAN_FUNC_ID:
            return
        for block in data.blocks:
            for m in block.measurements:
                print(f"{m.name} = {m.value}")

if __name__ == "__main__":
    setup_logging()
    app = MyXApp("my-xapp.yml")
    app.run_sync()
```

Lower-level entry points (`RicClient`, `RicXappConfig`, subscription
builders, sync/async control) are exported from `airpuls_ric_sdk`
directly for xApps that integrate the client into their own event
loop via `poll_fd` + `dispatch()`.

## License

Apache License 2.0 (`Apache-2.0`).  © airpuls GmbH.

The Linux wheels also bundle third-party shared libraries — GLib and
its GIO TLS module, GnuTLS and the libraries they use — under their
own licences, most of them the GNU LGPL.  The `NOTICE` file in the
wheel's `.dist-info/licenses/` names each of them, their licence texts
are beside it, and `.dist-info/sboms/auditwheel.cdx.json` lists their
exact versions.
