oai-python
High-performance, typed Python bindings for OpenAirInterface 5G NR. Use real
OAI physical-layer blocks, run persistent link and stack simulations, or test a
scheduler from one Python application—without managing separate UE and gNB
terminals.
Release 0.1.x is the bindings-only release for Linux x86-64. It does not install PyTorch or select another backend at runtime.
Install
uv add oai-python==0.1.0
uv run oai-python-diagnose
A complete PHY link
from oai_python.bindings.nr.phy.link import NrPhyLink
payload = bytes(range(64))
with NrPhyLink() as link:
slot = link.step(downlink_payload=payload)
link.run_slots(100)
(received,) = slot.transmissions
assert received.crc_ok and received.decoded_payload == payload
print(f"decoded {len(received.decoded_payload)} downlink bytes")
NrPhyLink owns the OAI state across every requested slot. The same process
can also run a one-UE real-PHY stack, a 1–16 UE MAC/FAPI simulation, or several
independent cells. See the Quickstart
for the differences.
Coverage
| Public surface | Coverage in 0.1 |
|---|---|
| Supported workflows | 42 exports |
| Supported granular/shared capabilities | 476 exports |
| Additional reference-only OAI inventory | 1,189 exports |
| Default NR wheel | 1,707 exports across 272 leaf modules |
Supported areas include NR PHY, coding, MAC, RLC, PDCP, SDAP, RRC, NAS/security, FAPI/nFAPI, signaling, and O-RAN value/codecs. An importable name does not by itself imply a supported end-to-end workflow; the coverage guide explains the three tiers.
Performance per slot
Warm steady-state latency on the release benchmark host. Each row compares an identical workload at the direct-C and public Python-call boundaries; rows do different telecom work and must not be compared with one another.
| Workload per slot | Timing boundary | Original pinned OAI (direct C) | Python bindings (public call) |
|---|---|---|---|
| Connected gNB MAC slot | one loaded scheduler slot | 5.08 us p50; 6.26 us p95 | 235.21 us p50; 249.47 us p95 |
| FR1 SISO PUSCH receive | estimation through demodulation for one frequency-domain slot | 185.81 us p50; 194.54 us p95 | 985.10 us p50; 1032.57 us p95 |
The benchmark methodology defines the exact geometry, warm-up, repetitions, hardware, equivalence checks, and timing boundaries. No general sub-millisecond claim is made beyond a named measured row.
Choose a simulation boundary
| Mode | Use it for |
|---|---|
| Granular PHY | Calling or replacing one real OAI coding, modulation, estimation, or receiver block |
| Full-PHY link | Link-level SISO waveform experiments without MAC |
| Full-PHY stack | One-UE access and traffic where MAC grants drive real PHY paths |
| MAC/FAPI | Fast 1–16 UE scheduler and protocol simulation with abstracted PHY outcomes |
| Independent cells | Several isolated simulations in one Python application |
The ordinary OAI scheduler is the default fast path. A Python policy can opt into a decision seam connected to the real PHY stack. External channel models use copied time-domain IQ samples; the wheel provides the insertion point, not a propagation model. The optional Sionna RT example shows OAI waveform → user-owned channel → OAI receiver without making Sionna a dependency.
Requirements and limits
- Linux x86-64 with glibc 2.28 or newer.
- Regular CPython 3.12 or newer through one ABI3 wheel, plus a distinct free-threaded CPython 3.14t wheel.
- Reviewed offline/in-memory 5G NR SA profile: FR1 band 78, numerology 1, 106 resource blocks, and SISO.
What is excluded?
The 0.1 wheel does not include alternative Python implementations, propagation models, Sionna RT, native/custom CUDA, RF/UHD/DPDK execution, an attached 5G core, or live E2/O-RAN runtime integration. It does not claim LTE/EPC/NSA, MIMO, mobility/handover, coordinated inter-cell interference, Windows, macOS, or ARM support. Sionna RT and other channel models remain optional user-owned Python around the bindings' time-domain IQ insertion point.
Built from OpenAirInterface 2026.w35 at ceccfc8ffa4340d5bdc08a9fc84d2e6ab3f9472c
with SIMDe 1c68d9ad60bf63f3fb527c4ee3b2319d828ffcc6.
Documentation and support
Quickstart · Examples · Supported API · Platform support · Issue tracker · Security policy
The project and compiled OAI code use the Collaborative Standards Software License; bundled third-party components retain their own notices.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
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 oai_python-0.1.0-cp314-cp314t-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: oai_python-0.1.0-cp314-cp314t-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 38.5 MB
- Tags: CPython 3.14t, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.11.31 {"installer":{"name":"uv","version":"0.11.31","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":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e306b60cb91c7337e90ad27e9bc4a719e7a14a73afbac43f2918ae57f94cc6cf
|
|
| MD5 |
8e1715c14b80aacdc6d8d8ba4bfe8671
|
|
| BLAKE2b-256 |
18c461dbce5ce89f98946ce50c1c02242046f222db03803e8fe4ab581e874cf1
|
File details
Details for the file oai_python-0.1.0-cp312-abi3-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: oai_python-0.1.0-cp312-abi3-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 37.5 MB
- Tags: CPython 3.12+, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.11.31 {"installer":{"name":"uv","version":"0.11.31","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":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3a9f8d3b618ca5fbd8429d6ed29bad46b039997bf3ecb29f8236679589d8be0b
|
|
| MD5 |
0448b749612cc70edbc9fc0b394315ff
|
|
| BLAKE2b-256 |
c5c70c1188c0e2a54e41131e0e8c5e702ea5f12fe6126884e56ca40806720956
|