/app-example

Primary LanguagePythonApache License 2.0Apache-2.0

Get Started

  • python3 -m venv venv
  • source venv/bin/activate
  • pip install -r requirements.txt
  • python app.py

swagger-client

This is a sample API written to become a Sidecar leveraging the Gin Go framework.

This Python package is automatically generated by the Swagger Codegen project:

Requirements.

Python 2.7 and 3.4+

Installation & Usage

pip install

If the python package is hosted on Github, you can install directly from Github

pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git)

Then import the package:

import swagger_client 

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import swagger_client

Getting Started

Please follow the installation procedure and then run the following:

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.StorageApi(swagger_client.ApiClient(configuration))
path = 'path_example' # str | Path to file

try:
    # Download a file
    api_response = api_instance.download_file(path)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling StorageApi->download_file: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to //localhost:8080/api/v1

Class Method HTTP request Description
StorageApi download_file GET /storage/download-file Download a file
UtilitiesApi health_check GET /health-check Quick health check to test latency

Documentation For Models

Documentation For Authorization

BasicAuth

  • Type: HTTP basic authentication

Author

tristan.leonard1@ibm.com