Skip to main content

No project description provided

Project description

GNPy API

Install via pip Python versions Gerrit

REST API (experimental)

This repository extends GNPy with additional interfaces, allowing for more flexible control and interaction with its simulation engine. These interfaces can be used to integrate GNPy into software-defined networking (SDN) architectures or other external applications.

GNPy is an open-source Python-based library that models and evaluates the performance of optical networks. It is widely used for path computation, QoT (Quality of Transmission) estimation, and network planning.

🚀 Installation

Build from Source - Option 1

Clone the repository and install the package:

python3 setup.py install

or if you want to install it in a docker container:

docker docker build ./ -t gnpy-api

PiPy - Option 2

pip install gnpy-api

DockerHub - Option 3

Coming....

Quick Start

🧪 Usage - CLI

Start the REST API server:

python ./samples/rest_example.py

See the help for the REST API:

python ./samples/rest_example.py -h

Send example data to the REST API:

curl --location 'https://localhost:8080/api/v0.1/path-request' --header 'Content-Type: application/json' --data @gnpyapi/exampledata/planning_demand_example.json -k

🧪 Usage - Docker

🔄 Compatibility

Different versions of this interface extension are compatible with specific versions of GNPy. Please refer to the table below to ensure that you are using a supported version combination.

Interface Version Compatible GNPy Version Notes
v0.2.x >=2.14 YANG model validation
v0.1.x >=2.12.1 Initial release

⚠️ If you use an incompatible combination, some features may not work correctly or may produce unexpected errors.

To check your GNPy version, run:

pip show gnpy

📚 Documentation

Refer to the official GNPy documentation for information about network modeling and simulation capabilities.

API documentation is available in the docs folder.

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

gnpy_api-0.2.0.tar.gz (66.7 kB view details)

Uploaded Source

Built Distribution

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

gnpy_api-0.2.0-py3-none-any.whl (15.0 kB view details)

Uploaded Python 3

File details

Details for the file gnpy_api-0.2.0.tar.gz.

File metadata

  • Download URL: gnpy_api-0.2.0.tar.gz
  • Upload date:
  • Size: 66.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for gnpy_api-0.2.0.tar.gz
Algorithm Hash digest
SHA256 3c1e37da5e2f7bae41a3f5912e1bb7b6b14200df1ed15e2226a95f899bfdfc0d
MD5 db549ff61dd89e2f925a35e21996adf9
BLAKE2b-256 b80f15324dbdb9ab868bbdb1f965de43256a5594b1f242d9e1973c85d4c26752

See more details on using hashes here.

Provenance

The following attestation bundles were made for gnpy_api-0.2.0.tar.gz:

Publisher: main.yml on Telecominfraproject/oopt-gnpy-api

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gnpy_api-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: gnpy_api-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 15.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for gnpy_api-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2582505e86276fafb47de7a4085ce75ec907ebb5261a83d85d802817b3c5c9c7
MD5 959223373f31cb1c913138a768bd8338
BLAKE2b-256 28687eb22c9cbc20fa241b68ccb778accf397554d745b15c8212fc37d83e89f1

See more details on using hashes here.

Provenance

The following attestation bundles were made for gnpy_api-0.2.0-py3-none-any.whl:

Publisher: main.yml on Telecominfraproject/oopt-gnpy-api

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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