This release is a pre-release and may not be stable for production use.
aiomsa
aiomsa is a Python 3.7+ framework built using asyncio. At its core, aiomsa
provides a simple and standardized way to write xApps that can be deployed as
microservices in Python.
Installation
aiomsa can be installed from PyPI.
pip install aiomsa
You can also get the latest code from GitHub.
poetry add git+https://github.com/facebookexternal/aiomsa
Getting Started
The follwing example shows how to use aiomsa to create a simple xApp for subscribing to the E2T service for a particular custom service model.
import asyncio
import aiomsa
import aiomsa.abc
from onos_ric_sdk_py import E2Client, SDLClient
from .models import MyModel
async def run(e2: aiomsa.abc.E2Client, e2_node_id: str) -> None:
subscription = await e2.subscribe(
e2_node_id,
service_model_name="my_model",
service_model_version="v1",
subscription_id="my_app-my_model-sub",
trigger=bytes(MyModel(param="foo")),
actions=[
aiomsa.abc.RICAction(
id=1,
type=aiomsa.abc.RICActionType.REPORT,
subsequent_action_type=aiomsa.abc.RICSubsequentActionType.CONTINUE,
time_to_wait=aiomsa.abc.RICTimeToWait.ZERO,
)
],
)
async for (_header, message) in subscription:
print(message)
async def main() -> None:
async with E2Client(app_id="my_app", e2t_endpoint="e2t:5150") as e2, SDLClient(
topo_endpoint="topo:5150"
) as sdl:
async for e2_node in sdl.watch_e2_connections():
asyncio.create_task(run(e2, e2_node.id))
if __name__ == "__main__":
aiomsa.run(main())
Metadata
Release files for aiomsa 0.1.0a8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| aiomsa-0.1.0a8.tar.gz | 14.4 kB | Without provenance | Details for aiomsa-0.1.0a8.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| aiomsa-0.1.0a8-py3-none-any.whl | Python 3 | none | any | Details for aiomsa-0.1.0a8-py3-none-any.whl |
Total release size: 27.8 kB
Release files / aiomsa-0.1.0a8.tar.gz
| Download URL | aiomsa-0.1.0a8.tar.gz |
|---|---|
| Size | 14.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3c0a177a5482ff0c50f5a6274e76576796f582249099f38a1b8072b2f6c93917
|
|
BLAKE2b-256 checksum How to use checksums |
aacbf192ee60f96d3c9617f6365b1f3d6ecb0d61bfa686c878a7fd0152c7cd02
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.7 CPython/3.9.6 Linux/5.8.0-1036-azure
|
Release files / aiomsa-0.1.0a8-py3-none-any.whl
| Download URL | aiomsa-0.1.0a8-py3-none-any.whl |
|---|---|
| Size | 13.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f2db5164df23b7f1917858cb5d2fb5e9841be3100c9cbaf99ad2a202e63346d0
|
|
BLAKE2b-256 checksum How to use checksums |
c1109d24952bb77ae1d5d6a71c3b944f2793bfba7b3ec6fcb5eaf2ce0116c12e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.7 CPython/3.9.6 Linux/5.8.0-1036-azure
|
Security for aiomsa 0.1.0a8
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.