vania-janet/multiturn-rag-retrieval-data huggingface dataset:
Specific instructions for downloading and installing the SDK is available in [Using Python](https://cloud.ibm.com/docs/cloud-object-storage/libraries?topic=cloud-object-storage-python)[Using Node.js](https://cloud.ibm.com/docs/cloud-object-storage/libraries?topic=cloud-object-storage-node)[Using Java](https://cloud.ibm.com/docs/cloud-object-storage/libraries?topic=cloud-object-storage-java)[Using Go](https://cloud.ibm.com/docs/cloud-object-storage?topic=cloud-object-storage-using-go).





 Code Example 

The code examples below provide introductory examples of running the basic operations with Object Storage. For simplicity, the code example can be run multiple times as it uses Universally Unique Identifiers (UUIDs) for bucket/item names to prevent potential conflicts.

In your code, you must remove the angled brackets or any other excess characters that are provided here as illustration.

To complete the code example, you need to replace the following values:



 Value Description Example 

 <endpoint> Regional endpoint for your COS instance s3.us-south.cloud-object-storage.appdomain.cloud 
 <api-key> IAM API Key with at least Writer permissions xxxd12V2QHXbjaM99G9tWyYDgF_0gYdlQ8aWALIQxXx4 
 <resource-instance-id> Unique ID for the Service Instance crn:v1:bluemix:public:cloud-object-storage:global:a/xx999cd94a0dda86fd8eff3191349999:9999b05b-x999-4917-xxxx-9d5b326a1111:: 
 <storage-class> Storage class for a new bucket us-south-standard 



For more information about endpoints, see [Endpoints and storage locations](https://cloud.ibm.com/docs/cloud-object-storage?topic=cloud-object-storage-endpointsendpoints).
2. To view summary usage help for all the toolkit commands, enter the following command:

apic
3. To view usage help for any command, use the --help option. For example:

apic validate --help









 Installing LoopBack connectors 

Before you can use a LoopBack data source to access data in a backend system such as a database, you must install the data source connector. The In-memory and email connectors are built in to LoopBack, so you don't need to install them.



 Prerequisites 

The Oracle, DB2, and SQLLite connectors require C compiler tools to build and install binary extensions. The exact requirements depend on your operating system as described in the following list.

Linux



* Python v2.7 (v3.x is not supported)
* make
* A C/C++ compiler toolchain, for example GCC version 4.2 or later.
* On Debian and Debian-derived distributions (Ubuntu, Mint etc), use the command: apt-get install build-essential



Mac OS X



* [Python Releases for Mac OS X](https://www.python.org/downloads/mac-osx/)
* [Xcode](https://developer.apple.com/xcode/?cm_mc_uid=46449280653414622613810&cm_mc_sid_50200000=1459433716)



Windows



* [Microsoft .NET Framework 4](https://www.microsoft.com/en-us/download/details.aspx?id=17851)
* [Visual Studio](https://visualstudio.microsoft.com/downloads/)
* [Python v2.7.10](https://www.python.org/downloads/release/python-2710/)
* [Microsoft Windows SDK for Windows 10](https://developer.microsoft.com/en-us/windows/downloads/windows-10-sdk)
* npm version 3: See the following note.
Using Python 

Python support is provided through a fork of the boto3 library with features to make the most of IBM Cloud® Object Storage.

It can be installed from the Python Package Index through pip install ibm-cos-sdk.

Source code can be found at [GitHub](https://github.com/ibm/ibm-cos-sdk-python/).

The ibm_boto3 library provides complete access to the IBM Cloud® Object Storage API. Endpoints, an API key, and the instance ID must be specified during creation of a service resource or low-level client as shown in the following basic examples.

The service instance ID is also referred to as a resource instance ID. The value can be found by creating a [service credential](https://cloud.ibm.com/docs/cloud-object-storage/iam?topic=cloud-object-storage-service-credentials), or through the CLI.

Detailed documentation can be found at [here](https://ibm.github.io/ibm-cos-sdk-python/).



 Upgrading from 1.x.x 

The 2.0 version of the SDK introduces a namespacing change that allows an application to use the original boto3 library to connect to AWS resources within the same application or environment. To migrate from 1.x to 2.0, some changes are necessary.

1. Update the requirements.txt, or from PyPI via pip install -U ibm-cos-sdk. Verify no older versions exist with pip list | grep ibm-cos.
2. Update any import declarations from boto3 to ibm_boto3.
3. If needed, reinstall the original boto3 by updating the requirements.txt, or from PyPI via pip install boto3.





 Creating a client and sourcing credentials 

To connect to COS, a client is created and configured using credential information (API key and service instance ID). These values can also be automatically sourced from a credentials file or from environment variables.
App Configuration server SDK for Python 

App Configuration service provides SDK to integrate with your Python application.



 Integrating server SDK for Python 

App Configuration service provides SDK to integrate with your Python application. You can evaluate the values of your feature flag or property by integrating the App Configuration SDK.



1. Use either one of the following methods to install the SDK:

Using pip

pip install --upgrade ibm-appconfiguration-python-sdk

Using easy_install

easy_install --upgrade ibm-appconfiguration-python-sdk
2. In your Python application code, include the SDK module with:

from ibm_appconfiguration import AppConfiguration, Feature, Property, ConfigurationType
3. Initialize the sdk to connect with your App Configuration service instance.

appconfig_client = AppConfiguration.get_instance()
appconfig_client.init(region=AppConfiguration.REGION_US_SOUTH, guid='GUID', apikey='APIKEY')
appconfig_client.set_context(collection_id='collection_id', environment_id='environment_id')

Where:



* region: Region name where the service instance is created. Use AppConfiguration.REGION_US_SOUTH for Dallas, AppConfiguration.REGION_US_EAST for Washington DC, AppConfiguration.REGION_EU_GB for London, and AppConfiguration.REGION_AU_SYD for Sydney.
* guid: GUID of the App Configuration service. Obtain it from the service credentials section of the App Configuration service dashboard.
* apikey: ApiKey of the App Configuration service. Obtain it from the service credentials section of the App Configuration service dashboard.
* collection_id: ID of the collection created in App Configuration service instance.
* environment_id: ID of the environment created in App Configuration service instance.



The init() and set_context() are the initialisation methods and should be invoked only once by using appconfig_client.
* [Bucket](https://ibm.github.io/ibm-cos-sdk-python/reference/services/s3.htmlbucket)



* Methods



* [create](https://ibm.github.io/ibm-cos-sdk-python/reference/services/s3.htmlS3.Bucket.create)









 Creating a new text file 

def create_text_file(bucket_name, item_name, file_text):
print("Creating new item: {0}".format(item_name))
try:
cos.Object(bucket_name, item_name).put(
Body=file_text
)
print("Item: {0} created!".format(item_name))
except ClientError as be:
print("CLIENT ERROR: {0}n".format(be))
except Exception as e:
print("Unable to create text file: {0}".format(e))

SDK References



* Classes



* [Object](https://ibm.github.io/ibm-cos-sdk-python/reference/services/s3.htmlobject)



* Methods



* [put](https://ibm.github.io/ibm-cos-sdk-python/reference/services/s3.htmlS3.Object.put)









 List available buckets 

def get_buckets():
print("Retrieving list of buckets")
try:
buckets = cos.buckets.all()
for bucket in buckets:
print("Bucket Name: {0}".format(bucket.name))
except ClientError as be:
print("CLIENT ERROR: {0}n".format(be))
except Exception as e:
print("Unable to retrieve list buckets: {0}".format(e))

SDK References



* Classes
Content 



 Languages / platforms 

Every IBM Service that offers public APIs SHOULD offer SDKs for the languages / platforms most commonly used by developers that use the service.



* Java, Node, Python, and Go are "first-tier" languages that should have SDK support.
* iOS and Android SDKs are important for services that may be used from mobile devices.
* Other languages that may warrant SDK support in particular domains are C#, Ruby, Scala.







 Basic interface 

The SDK SHOULD provide a basic interface that maps directly onto the operations of the underlying API. Each method of an SDK SHOULD correspond to exactly one operation of the underlying API, and this relationship should be clear from design of the API.

Operations whose functionality is fully supported by a related operation SHOULD be omitted. This can occur, for example, when an operation is exposed with both a GET and an POST method, where the GET offers a subset of the features of the POST but with a simpler interface.





 Methods 

Methods MUST employ a flexible parameter-passing design that allows optional parameters to be added to a method without causing incompatibility with applications using the prior version of the method.

In some languages this can be accomplished using standard language features like default parameter values, but in other languages (e.g. Java) the method parameters must be encapsulated into an "options" object.





 Streaming 

For a language/runtime that supports stream value types:



* The SDK SHOULD allow any potentially large input value to a method to be supplied as a stream.
* The SDK SHOULD allow the result of a method to be returned as a stream if that value may be large.







 Asynchronous method calls 

The SDK MUST support asynchronous invocation of any method that performs a network operation. The SDK SHOULD support synchronous or pseudo-synchronous (e.g. async/await) invocation of methods that perform network operation in languages where this method style is idiomatic.





 Instrumentation 

The SDK SHOULD be instrumented so that relevant usage data can be collected by the service.
The following example uses ibmfunctions/action-python-v3.7 as a base image and installs the Python modules: matplotlib, pandas, and statsmodels.

FROM ibmfunctions/action-python-v3.7

RUN pip install 
--upgrade pip 
matplotlib 
pandas 
statsmodels
7. Build your custom Docker image.

docker build -t <dockerhub_username>/<repo_name>:<tag_name>
8. Push your image to Docker Hub.

docker push <dockerhub_username>/<repo_name>:<tag_name>

Be sure to log in to Docker Hub before you attempt to push your image.







 Deploying an action with a custom Docker image 

When you create your Cloud Functions action, you can combine your app file with a public Docker image to create a custom runtime environment. The action is invoked with the Docker image.

Run the action create command and include the --docker flag to specify a Docker image for your app to use.

ibmcloud fn action create <action_name> --docker <dockerhub_username>/<image_name> <app_file>

You can also deploy a compressed file with a Docker image to create an action. You can use the previous command and replace <app_file> with your compressed file. You can use this method to deploy large app files or incorporate large dependencies.

To see an example deployment of a custom Docker image with a Cloud Functions action, see [Packaging large Python dependencies in a custom Docker image](https://cloud.ibm.com/docs/openwhisk?topic=openwhisk-prepprep_python_docker).







 Preparing Go Apps 

You can create Actions by using Golang.

Use a single file for quick testing or development purposes. For production apps, pre-compile your Go actions into an executable file for better performance.
Schematics SDKs 

IBM Cloud® Schematics simplifies application development by abstracting much of the complexity of deploying application environments. Schematics SDKs are provided in multiple programming languages to assist application developers to integrate Schematics IaC operations into continuous integration and continuous delivery (CI/CD) tools and pipelines.

Following are the list of IBM Cloud Schematics server SDKs that are available for Node, Python, Go, and Java. For more information about installation and technical concepts, see readme file in the SDK documentation.



List of Schematics SDKs

 Server SDKs     SDK Documentation            

 [Go SDK](https://github.com/IBM/schematics-go-sdk)      [Go SDK documentation](https://github.com/IBM/schematics-go-sdk/blob/main/README.md)     
 [Java SDK](https://github.com/IBM/schematics-java-sdk)    [Java SDK documentation](https://github.com/IBM/schematics-java-sdk/blob/main/README.md)   
 [Node SDK](https://github.com/IBM/schematics-node-sdk)    [Node SDK documentation](https://github.com/IBM/schematics-node-sdk/blob/main/README.md)   
 [Python SDK](https://github.com/IBM/schematics-python-sdk)  [Python SDK documentation](https://github.com/IBM/schematics-python-sdk/blob/main/README.md)
* [Getting started with the Discovery tooling](https://cloud.ibm.com/docs/discovery?topic=discovery-getting-started)
* [Getting started with the Discovery API](https://cloud.ibm.com/docs/discovery?topic=discovery-gs-api)



* Discovery supports a number of SDKs to simplify the development of applications. The SDKs are available for many popular programming languages and platforms, including Node.js, Java, and Python. All SDKs are available from the [watson-developer-cloud namespace](https://github.com/watson-developer-cloud) on GitHub.



* For a complete list of SDKs and information about using them, see [Watson SDKs](https://cloud.ibm.com/docs/watson?topic=watson-using-sdks).
* For detailed information about all methods of the Node, Java, and Python SDKs, see the [API reference](https://cloud.ibm.com/apidocs/discovery).
SDK[Watson Data API](https://cloud.ibm.com/apidocs/watson-data-api)Watson Data API Service[Watson Data API for IBM Cloud Pak for Data](https://cloud.ibm.com/apidocs/watson-data-api-cpd)Watson Data API for IBM Cloud Pak for Data Software[Watson Machine Learning](https://cloud.ibm.com/apidocs/machine-learning)Watson Machine Learning Service[Watson Machine Learning for IBM Cloud Paks](https://cloud.ibm.com/apidocs/machine-learning-cp)Watson Machine Learning for IBM Cloud Paks Software[Watson OpenScale](https://cloud.ibm.com/apidocs/ai-openscale)Watson OpenScale SDKAnalytics[DataStage](https://cloud.ibm.com/apidocs/datastage)DataStage Service SDK[IBM Analytics Engine v2 API](https://cloud.ibm.com/apidocs/ibm-analytics-engine/ibm-analytics-engine-v2)IBM Analytics Engine v2
Given that the overwhelming majority of SDK adopters will be using Xcode as their development environment, you will want to include your .xcodeproj directory for contributors to easily get started.

You should use the standard [development tools](https://cloud.ibm.com/docs/sdk-handbook?topic=sdk-handbook-developer-tools) for Swift to check style and code coverage.





 Standard features 



 Authentication 

You are not required to use a particular library to provide the authentication for your service.

Your SDK must support all of the authentication methods supported by your service.





 Configuration 

Your SDK should allow various SDK configuration properties (e.g. service URL, authentication credentials) to be supplied through an external configuration mechanism (e.g. properties file or environment variables) in addition to a programmatic path. This will relieve SDK users from focusing on configuration-related functionality and will allow applications using your SDK to be flexible and avoid 'hard-coding' configuration information inside the application code.

If you build this capability into your SDK, you must document this mechanism clearly with examples.





 Requests 

Most networking operations in your Swift SDK should be asynchronous. DispatchGroups and other semaphores can be used for synchronous operations.





 Using swift-sdk-core 

[IBM swift-sdk-core](https://github.com/IBM/swift-sdk-core), formerly watson-developer-cloud/RestKit provides configuration and authentication support. You can use the existing functionality provided by this dependency in your SDK to leverage key capabilities in similar manners across the IBM Cloud.







 Documentation 

Your SDK is not useful if your audience cannot understand how to consume it in order to do the basic operations for your service. Your SDK needs to contain the following resources to help your users:



* README.md
* [Contributor Guidelines](https://cloud.ibm.com/docs/sdk-handbook?topic=sdk-handbook-documentationsdk-contributor-docs)
* Code Samples
* [Service documentation](https://cloud.ibm.com/docs/sdk-handbook?topic=sdk-handbook-documentation)
Running jobs with Lithops framework 

Lithops is an open source framework that designed to massively scale your Python applications. Lithops provides a simple push to the IBM Cloud® Code Engine experience so that you can focus on your Python code, while Lithops focuses on the deployment of your code at massive scale while monitoring executions, obtaining results, and much more. Lithops enables native Python integration with Code Engine by using the Lithops API. For more information about Lithops, see [Lithops quick start guide](https://github.com/lithops-cloud/lithopsquick-start).



 Running your first flow by using the Lithops framework 

Before you can run jobs that reference the Lithops framework, you must first install Lithops and set up a storage backend.

Before you begin



* Install [Code Engine CLI](https://cloud.ibm.com/docs/codeengine?topic=codeengine-install-cli).
* [Create and work](https://cloud.ibm.com/docs/codeengine?topic=codeengine-manage-project) with a Code Engine project.
* [Find and set your kubeconfig environment variable](https://cloud.ibm.com/docs/codeengine?topic=codeengine-kubernetes).





 Installing Lithops 



1. Install [Lithops](https://github.com/lithops-cloud/lithopsquick-start).
2. Create the [Lithops configuration file](https://github.com/lithops-cloud/lithops/tree/master/configlithops-configuration).
3. Install [Docker (community edition) version](https://docs.docker.com/get-docker/).
4. Log in to Docker.

docker login







 Setting up a storage backend for Lithops
[GitHub Access Token](https://cloud.ibm.com/docs-content/v1/content/f84e2238288b7f0355715a4c355609ce7ac48fb0/solution-tutorials/images/solution24-github-traffic-analytics/GithubAccessToken.png)

GitHub Access Token







 Step 5: Configure and test Python app 

After the preparation, you configure and test the app. The app is written in Python using the popular [Flask](https://flask.palletsprojects.com/) microframework. You can add repositories for statistics collection or remove them. You can access the traffic data in a tabular view or as line chart.



1. In a browser, open the URI of the deployed app. You should see a welcome page.

Zoom

![Welcome Screen](https://cloud.ibm.com/docs-content/v1/content/f84e2238288b7f0355715a4c355609ce7ac48fb0/solution-tutorials/images/solution24-github-traffic-analytics/WelcomeScreen.png)

Welcome Screen
2. In the browser, add /admin/initialize-app to the URI and access the page. It is used to initialize the application and its data. Click on the button Start initialization. This will take you to a password-protected configuration page. The email address you log in with is taken as identification for the system administrator. Use the email address and password that you configured earlier.
3. In the configuration page, enter a name (it is used for greetings), your GitHub user name and the access token that you generated before. Click on Initialize. This creates the database tables and inserts some configuration values. Finally, it creates database records for the system administrator and a tenant.

Zoom

!
sdclient = SdMonitorClient(token=SYSDIG_TOKEN,sdc_url=URL)

 Show the list of dashboards
ok, res = sdclient.get_dashboards()

 Loop through all fetched dashboards
for dashboard in res[1]:
 Delete dashboard if it matches the pattern (one or many)
if DASHBOARD_NAME in dashboard['name']:
print("Deleting " + dashboard['name'])
res = sdclient.delete_dashboard(dashboard)
Show more





 Download custom dashboards 

You can use Python to download custom dashboards.

When you download dashboards, you only download custom dashboards.





 Download custom dashboards in the default team 

The following code shows the structure of a Python script to download a custom dashboard from the default team.

!/usr/bin/env python3

import os
import sys
sys.path.insert(0, os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])), '..'))
from sdcclient import IbmAuthHelper, SdMonitorClient

 Parse arguments.
def usage():
print('usage: %s <endpoint-url> <apikey> <instance-guid>' % sys.argv[0])
print('endpoint-url: The endpoint URL that should point to IBM Cloud')
print('apikey: IBM Cloud IAM apikey that will be used to retrieve an access token')
print('instance-guid: GUID of an IBM Cloud Monitoring with monitoring instance')
sys.exit(1)

if len(sys.argv) != 4:
usage()

def zipdir(path, ziph):
 ziph is zipfile handle
for root, dirs, files in os.walk(path):
for file in files:
ziph.write(os.path.join(root, file))
To aid in adoption of your SDK, you should make your SDKs available in all three major package managers in the Swift network, if they are still useful to your target audience.

Your SDK should follow the [semantic versioning best practices](https://test.cloud.ibm.com/docs/sdk-handbook?topic=sdk-handbook-distributionsemantic-versioning).



 Community support 

Allow your users to find answers to their questions. Users should be able to report problems on GitHub by raising issues on your SDK repository. Having a public Slack channel is a great way to engage with users who have questions specific to their use cases.







 Style guidelines 

You should follow the conventions from [The Official raywenderlich.com Swift Style Guide](https://github.com/raywenderlich/swift-style-guide) and the [Swift API Design Guidelines](https://swift.org/documentation/api-design-guidelines/), with exceptions as follows:



* Use the following style for empty arrays and dictionaries per [The Swift Programming Language](https://docs.swift.org/swift-book/GuidedTour/GuidedTour.html//apple_ref/doc/uid/TP40014097-CH2-ID461l):



let emptyArray = [String]()
let emptyDictionary = [String: Float]()



* Use four spaces for indentation
* Maximum 500 characters line width



For an example SDK with these styles, see the [swift-sdk-template](https://github.ibm.com/CloudEngineering/swift-sdk-template).

Given that the overwhelming majority of SDK adopters will be using Xcode as their development environment, you will want to include your .xcodeproj directory for contributors to easily get started.

You should use the standard [development tools](https://cloud.ibm.com/docs/sdk-handbook?topic=sdk-handbook-developer-tools) for Swift to check style and code coverage.





 Standard features 



 Authentication 

You are not required to use a particular library to provide the authentication for your service.