Sep 21 2018
08:26 AM
- last edited on
May 26 2021
01:26 PM
by
TechCommunityAP
Sep 21 2018
08:26 AM
- last edited on
May 26 2021
01:26 PM
by
TechCommunityAP
Hi,
Working on the rest-api-samples for python from https://github.com/Azure-Samples/blockchain/tree/master/blockchain-workbench/rest-api-samples/python,
Ran the 'sudo python setup.py install' command and successfully installed. The documentation then states:
Then import the package:
import swagger_client
This appears to only work when running under python3.
The documentation then advises to run the following block:
from __future__ import print_function import time import swagger_client from swagger_client.rest import ApiException from pprint import pprint # create an instance of the API class api_instance = swagger_client.ApplicationsApi() application_id = 'application_id_example' # str | The id of the application. try: # api_instance.application_delete(application_id) except ApiException as e: print("Exception when calling ApplicationsApi->application_delete: %s\n" % e)
This does now work, you will receive a 'Failed to establish a new connection'. Clearly something is missing here. Do we need to populate authentication key values / tenant values / application id values in config files? If so which config files? The documentation is very bare and not useful. Can anyone please provide a working example. Thank you.