The JAGW-Python repository contains a Python client library for interacting with the Jalapeno API Gateway
Documentation can be found under https://jalapeno-api-gateway.github.io/jagw.
Here is a list of code examples with short description of demonstrated JAGW-Go functionality:
- request-all-nodes - request all lsnodes from the gateway
All code examples can be found under examples directory.
Below are short code samples showing a JAGW-Python client interacting with the Jalapeno API Gateway.
from jagw.channel import create_channel
from requestservice.requestservice_pb2_grpc import RequestServiceStub
from requestservice.requestservice_pb2 import TopologyRequest
HOST = '172.16.19.66'
PORT = '9903'
def get_all_lsnodes():
channel = create_channel(HOST, PORT)
with channel:
stub = RequestServiceStub(channel)
response = stub.GetLsNodes(TopologyRequest())
print(response)
get_all_lsnodes()
Complete example in request_all_nodes.py
- Contribute code by submitting a Pull Request.
- Report bugs by opening an Issue.
- Ask questions & open discussions by starting a Discussion.