Skip to main content

This repository develops a Python Software Development Kit(SDK) which focuses on connecting to OpenCAPIF (Common API Framework for 3GPP Northbound APIs) in a simple way, lowering integration complexity and allowing developers to focus on Network Applications (Network Apps) or services development.

Project description

OpenCAPIF SDK

This repository develops a Python Software Development Kit (SDK) which facilitates integration with OpenCAPIF (Common API Framework for 3GPP Northbound APIs), significantly reducing integration complexity and enabling developers to focus on building Network Applications (Network Apps).

The SDK supports both CAPIF roles: Invoker and Provider, and provides simplified methods for interacting with OpenCAPIF. It is compatible with the following public releases:

Network App Developers

A Network App refers to an external application or service that interacts with the 3GPP network using standardized APIs. These apps can be created by network operators, third-party providers, or other entities to access advanced network services like QoS, network slicing, or location services via CAPIF.

Network Apps take on one of two roles:

  • Invoker: Consumes APIs exposed by providers to access network capabilities.
  • Provider: Exposes APIs/services to be consumed by invokers. A Provider includes:
    • AMF (API Management Function): Manages onboarding/offboarding, monitoring, and auditing.
    • APF (API Publishing Function): Publishes APIs to the CCF.
    • AEF (API Exposing Function): Exposes APIs, validates authorizations, and logs usage.

The SDK maps Python functions to CAPIF OpenAPI endpoints as defined in 3GPP TS 29.222 v18.5.0. A detailed mapping of supported endpoints is available in the full documentation.

Requirements

To use the OpenCAPIF SDK, a registered account on the CAPIF instance is needed. Contact the system administrator to obtain a CAPIF username and password.

Installation

Install the SDK using pip:

pip install opencapif_sdk

Configuration Overview

Configuration is done through a JSON file (capif_sdk_config.json) with common and role-specific fields.

Common Fields (Invoker & Provider)

  • capif_host, register_host
  • capif_https_port, capif_register_port
  • capif_username, capif_password
  • debug_mode

Invoker-specific Fields

  • invoker_folder, capif_callback_url
  • supported_features, cert_generation
  • Optional: discover_filter, check_authentication_data

Provider-specific Fields

  • provider_folder, supported_features, cert_generation
  • APFs, AEFs, publish_req, api_description_path

Using discover_filter

The discover_filter must comply with the Discover Service API. It allows filtering by specific fields (e.g., api-name) during discovery.

Using publish_req

This section enables API publishing using the CAPIF Publish Service API. Required fields include:

  • service_api_id
  • publisher_apf_id
  • publisher_aefs_ids
  • api_description_path

A helper is available to translate OpenAPI to ServiceAPIDescription format:

from opencapif_sdk import api_schema_translator
translator = api_schema_translator("./path/to/openapi.yaml")
translator.build("https://192.168.1.10:8080/exampleAPI/v1", "0", "0")

Configuration Field Descriptions

Key parameters include:

  • capif_username, capif_password: Credentials
  • supported_features: Hex bitmask (e.g., "4")
  • debug_mode: Enables debug logging
  • api_description_path: Path to the ServiceAPIDescription JSON

Provider Artifacts

In provider_folder/<capif_username>/, the SDK stores:

  • provider_capif_ids.json
  • capif_<api_name>_<api_id>.json
  • service_received.json
  • provider_service_ids.json

Invoker Artifacts

In invoker_folder/<capif_username>/, the SDK stores:

  • capif_api_security_context_details.json, which includes:
    • api_invoker_id
    • Available API metadata (after discovery)
    • JWT token (after get_tokens())

Known Issues

The following APIs are not yet supported:

Some publishing operations fail if the number of AEFs/APFs is increased after initial onboarding.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

opencapif_sdk-0.1.24.tar.gz (44.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

opencapif_sdk-0.1.24-py3-none-any.whl (39.9 kB view details)

Uploaded Python 3

File details

Details for the file opencapif_sdk-0.1.24.tar.gz.

File metadata

  • Download URL: opencapif_sdk-0.1.24.tar.gz
  • Upload date:
  • Size: 44.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for opencapif_sdk-0.1.24.tar.gz
Algorithm Hash digest
SHA256 95e0e9f774495bd4c03dcd150c2203a3bdeb2d33026c86c96f585c39225d3b58
MD5 3b7e0c66846f333ea375069156ad32b9
BLAKE2b-256 0e8271a021e959684a4204f4750bb857f6e1733d5495370235f346beee54615f

See more details on using hashes here.

File details

Details for the file opencapif_sdk-0.1.24-py3-none-any.whl.

File metadata

  • Download URL: opencapif_sdk-0.1.24-py3-none-any.whl
  • Upload date:
  • Size: 39.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for opencapif_sdk-0.1.24-py3-none-any.whl
Algorithm Hash digest
SHA256 cb535a7f299749fabacc9083d5475c138fc9a49b22c54420498a3bec2a11e009
MD5 03a06ff1a254955c191b902c84df1fa3
BLAKE2b-256 c439aa71abf02ef880b53d180d3eb85c33b71f1ee0f511c2132f73c4ef135b96

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page