vania-janet/multiturn-rag-retrieval-data huggingface dataset:
Retrieving data](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-creating-and-populating-a-simple-ibm-cloudant-database-on-ibm-cloudretrieving-data).







 Installing Python 

Normally, you don't run commands individually in Python. You usually create a script, which is a list of the commands you want to run, stored in a Python file, with a py extension.



1. Set up service credential requirements.

a. Create a service instance and credentials by following the [Getting started](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-getting-started-with-cloudant) tutorial.

b. [Locate your service credentials](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-locating-your-service-credentialslocating-your-service-credentials) by following this tutorial.
2. Install the required version of Python.

You must have a current version of the [Python programming language](https://www.python.org/) that is installed on your system. [: note]

a. Check that Python is installed by running the following command at a prompt:

python3 --version

b. Verify that you get a result similar to the following example:

Python 3.8.1
3. Verify that your Python Client Library meets the requirement.

The following examples use the deprecated python-cloudant client library.

a. Check that the client library installed successfully by running the following command at a prompt:

pip freeze

You get a list of all the Python modules installed on your system.

b. Inspect the list, looking for an IBM Cloudant entry similar to the following example:

cloudant==2.14.0







 Step 1: Connecting to a service instance 

You must connect to your service instance before you create a database.

The following components are identified as normal import statements.
Retrieving data](https://cloud.ibm.com/docs/services/Cloudant?topic=Cloudant-creating-and-populating-a-simple-ibm-cloudant-database-on-ibm-cloudretrieving-data).







 Installing Python 

Normally, you don't run commands individually in Python. You usually create a script, which is a list of the commands you want to run, stored in a Python file, with a py extension.



1. Set up service credential requirements.

a. Create a service instance and credentials by following the [Getting started](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-getting-started-with-cloudant) tutorial.

b. [Locate your service credentials](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-locating-your-service-credentialslocating-your-service-credentials) by following this tutorial.
2. Install the required version of Python.

You must have a current version of the [Python programming language](https://www.python.org/) that is installed on your system. [: note]

a. Check that Python is installed by running the following command at a prompt:

python3 --version

b. Verify that you get a result similar to the following example:

Python 3.8.1
3. Verify that your Python Client Library meets the requirement.

The following examples use the deprecated python-cloudant client library.

a. Check that the client library installed successfully by running the following command at a prompt:

pip freeze

You get a list of all the Python modules installed on your system.

b. Inspect the list, looking for an IBM Cloudant entry similar to the following example:

cloudant==2.14.0







 Step 1: Connecting to a service instance 

You must connect to your service instance before you create a database.

The following components are identified as normal import statements.
For more information, see [Getting started with the IBM Cloud CLI](https://cloud.ibm.com/docs/cli?topic=cli-getting-started). 
 <br><br> * Get started with IBM Cloud Shell<br><br><br> The Cloud Shell gives you a personal cloud-based shell workspace with the full IBM Cloud CLI and more command-line tools with no installation needed. Learn more about [Working in IBM Cloud Shell](https://cloud.ibm.com/docs/cloud-shell?topic=cloud-shell-shell-ui). 
 <br><br> * Get started with IBM Cloud Schematics<br><br><br> Schematics provides powerful set of Infrastructure as Code (IaC) tools - Terraform, Ansible, Helm - as a service to program your cloud infrastructure. Schematics can run your end-to-end automation to build one or more stacks of cloud resources, manage their lifecycle, manage changes in their configurations, deploy your app workloads, and perform Day 2 operations. Review the [Getting started: IBM Cloud Schematics](https://cloud.ibm.com/docs/schematics?topic=schematics-getting-started) documentation. 
 <br><br> * Get started with APIs<br><br><br> IBM Cloud services provide APIs that comply with OAuth 2.0 authentication standards and accept bearer tokens that are provided by IBM Cloud's Identity and Access Management (IAM) service. [Explore the API docs](https://cloud.ibm.com/docs?tab=api-docs) for the services that you plan on using. 







 Set up accounts and enterprises 

This checklist is for administrators who are responsible for creating and setting up an account structure in IBM Cloud and enabling users within their company to create and manage cloud resources. IBM Cloud offers you the ability to create a stand-alone account and an enterprise.

Stand-alone account
: This type of account allows an account owner, for example a department or business unit administrator to add users to the account, assign access roles and permissions, manage billing and payments, and more.

Enterprise
Getting started with the IBM Cloud CLI 

In this tutorial, you install the the latest version of the stand-alone IBM Cloud® Command Line Interface.

Want to start working with the IBM Cloud CLI? Try out IBM Cloud Shell, which gives you a personal cloud-based shell workspace with the full IBM Cloud CLI and tons of command line tools - no installation needed. To get started, click the Cloud Shell icon ![IBM Cloud Shell icon](https://cloud.ibm.com/docs-content/v1/content/c169dfbb5a2bb64d01f8c6ca8d8691910f0a702e/icons/terminal-cloud-shell.svg) in the IBM Cloud console menu bar. For more information, see [Getting started with IBM Cloud Shell](https://cloud.ibm.com/docs/cloud-shell?topic=cloud-shell-getting-started).



 Before you begin 



* Depending on your [IBM Cloud® account type](https://cloud.ibm.com/registration), access to certain resources might be limited or constrained. Depending on your plan limits, certain capabilities that are required by some toolchains might not be available. For more information, see [Setting up your IBM Cloud account](https://cloud.ibm.com/docs/account?topic=account-account-getting-started).
* For Linux™, install the [curl](https://curl.haxx.se/download.html) command for downloading packages through the command line. If curl is already installed, the installer updates it to the latest version.



If you need to use a 32-bit version of the CLI, or a previous version other than the latest for IBM Cloud dedicated environments, see [IBM Cloud CLI releases](https://github.com/IBM-Cloud/ibm-cloud-cli-release/releases/).





 Step 1: Run the installation command 

The latest version of the IBM Cloud CLI is installed when you run the command. As the CLI installs, keep an eye on the command line to authenticate as needed.



* For MacOS, run the following command:
Working with your IBM Cloudant account 

Your account is your entry point for the IBM® Cloudant® for IBM Cloud® API. You access your account by using the address prefix https://$ACCOUNT.cloudant.com.

For your IBM Cloudant Dashboard, you always use this address: https://$ACCOUNT.cloudant.com/dashboard.html.

If you don't have an account yet, sign in to [IBM Cloudant](https://cloudant.com/sign-up/).

To see whether your IBM Cloudant account is accessible, make a GET against https://$ACCOUNT.cloudant.com. If you misspell your account name, you might get the following error, [503: Service unavailable](https://cloud.ibm.com/apidocs/cloudantlist-of-http-codes). You can see the types of authentication that are available in the following list:



* [IBM Cloud® Identity and Access Management (IAM)](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-work-with-your-accountauthentication-iam)
* [Basic authentication](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-work-with-your-accountbasic-authentication)
* [Cookie authentication](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-work-with-your-accountcookie-authentication)





 IAM authentication 

You can perform the following tasks with IAM:



* Centrally manage access management across IBM Cloud.
* Allow a user or service to access many different resources by using the same set of credentials (for example, same username and password or IAM API key).
* IAM API keys can be granted access to account management functions, like creating new databases.
Getting started with IBM Cloud Shell 

In this getting started tutorial, you use IBM® Cloud Shell to clone a sample Node.js app. IBM Cloud Shell is a cloud-based shell workspace that you can access through your browser. It's preconfigured with the full [IBM Cloud CLI](https://cloud.ibm.com/docs/cli?topic=cli-getting-started) and tons of plug-ins and tools that you can use to manage apps, resources, and infrastructure.

New to Cloud Shell? [Watch the demo video](https://www.youtube.com/watch?v=a8YHFyYfpVI) to see how quickly you can start using it from the IBM Cloud console.



 Before you begin 



* If you don't already have an IBM Cloud account, [sign up for one](https://cloud.ibm.com/registration/) and log in.
* Note the following account access information that might affect your access to Cloud Shell and its features:



* An account administrator can grant specific users access to Cloud Shell and its features, even if Cloud Shell settings are disabled at the account level. For more information, see [Assigning access to Cloud Shell and its features at a user level](https://cloud.ibm.com/docs/account?topic=account-shell-settingsshell-access-user).
* Account owners or users with Cloud Shell administrator access can enable or disable Cloud Shell features for an account. The available features in this release are File upload and download and Web preview. The feature settings apply only to the enabled Cloud Shell locations. For more information, see [Enabling or disabling Cloud Shell features for an account](https://cloud.ibm.com/docs/account?topic=account-shell-settingsshell-features-enable).
* For more information, see [IAM roles and actions](https://cloud.ibm.com/docs/account?topic=account-iam-service-roles-actionsibm-cloud-shell).









 Step 1: Start a session in IBM Cloud Shell 

In the IBM Cloud console, click the IBM Cloud Shell icon !
Be sure to make a note of the APIKey and URL when you create your service credentials.
2. Ensure you have access to a Mac or Linux™ terminal.
3. Download [Git](https://git-scm.com/downloads).
4. Download [Node.js and npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm).







 Step 1: Get the code 



1. Open your terminal.
2. Type the following command:

git clone https://github.com/IBM-Cloud/todo-list.git
cd todo-list







 Step 2: Prepare the environment and run the website 

In this step, you install all the code dependencies and environment variables you need to run your website.



1. Ensure you are in the todo-list directory.
2. From your terminal, run the following command:

npm install
export CLOUDANT_APIKEY="<the_apikey_from_prerequisites>"
export CLOUDANT_URL="https://<the_url_from_prerequisites>"
npm run start



When you run this command for the first time, your code detects that no database exists. The code creates a database for you with some indexes (by date and by tag) and some sample data.





 Step 3: Check out your website! 

Now, you can check out your website.



1. From your browser, go to https://localhost:8080.

You can see your to-do list with a couple of items on it:

Zoom

![Your to-do list](https://cloud.ibm.com/docs-content/v1/content/522c6f62358b063f921283400a601c3f9bc66f08/Cloudant/tutorials/images/todolist.png)

Figure 1. Your web-based To-Do list
Getting help and support for IBM Cloudant 

If you experience an issue or have questions when you use IBM® Cloudant® for IBM Cloud®, you can use the following resources before you open a support case.



*  Review the [FAQs](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-faq-authenticating-cloudant) in the product documentation.
*  Click [Learning Center](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-learning-center) to find helpful videos on IBM Cloudant features. The videos build on each other to guide you through the steps that are needed to complete various tasks. For example, the videos show how to add your first document to query a database and how to understand IBM Cloudant's organization.
*  Check the status of the IBM Cloud platform and resources by going to the [Status page](https://cloud.ibm.com/status).
*  Review [Stack Overflow](https://stackoverflow.com/questions/tagged/cloudant) to see whether other users experienced the same problem. When you ask a question, tag the question with ibm-cloud and Cloudant so that the IBM Cloudant development teams see it.



If you can't resolve the problem, open a support case. For more information, see [Creating support cases](https://cloud.ibm.com/docs/get-support?topic=get-support-open-case). If you like, you can also [submit feedback](https://cloud.ibm.com/docs/overview?topic=overview-feedback).



  Providing support case details 

To ensure that the support team can start investigating your case to provide a timely resolution, you must include detailed information along with steps to re-create the issue, if applicable. Review the following types of information to include in your support case for issues with IBM Cloudant.



1.  Provide the CRN associated with the IBM Cloudant instance relevant to the ticket.
2.  For a performance problem, for example, errors or time outs, also provide the following information:



*  Start and end timestamps with time zone.
*  Request URLs affected by the issue.
*  Response bodies that show unexpected behavior (error, status code, or time out).



3.  For a dashboard or UI issue, provide screen captures that show the problem.
Getting set up to sell software 

Welcome to IBM Cloud®! To start onboarding your software to our cloud platform, first complete a few tasks: provide your company and product details, create a test environment, and set up access for your team to help with the onboarding process.



 Watch and learn 

Onboarding software to IBM Cloud involves four major steps: registering in Partner Center, customizing your product details for the IBM Cloud catalog, testing and validating your product, and, finally, publishing your product. Check out the following video for a walk-through of the complete process.



* Video transcript

By onboarding and selling your product on IBM Cloud, you can grow your business and expand your reach to clients globally, by leveraging IBM's trusted relationships with fortune 500 enterprises. You can accelerate your time to market and gain a competitive edge, all while taking advantage of flexible, secure options across open source and compute technologies.

Onboarding your product involves four major steps - registering in Partner Center, customizing your product details, testing and validating your product, and, finally, publishing your product. In this demo, we’ll focus on using a Terraform template as the delivery method.

Get started by heading to Partner Center in the IBM Cloud console - your one-stop shop for onboarding your product. [Click My products on the Partner Center home page to open the Getting started dashboard]

First, register your product by providing the name of your company and then creating your test environment. This test environment will house your product during the onboarding process. [In the Create your test environment section, click Create]

Next, if you want team members to help with the onboarding process, get them set up with access to your account. [In the Assign access section, click Assign to assign access. Then, click Let's go.]

Confirm your legal agreement with IBM. You can instantly accept the IBM Digital Provider Agreement, or you can upload your own custom agreement, which will need to be reviewed and approved by IBM. [Click Provide details then click Standard and confirm that you've read and agree to the IBM Digital Provider Agreement.]

After confirming your agreement, click Create, and add the name of your product. [Click My products > Create]
Check that the client library installed successfully by running the following command at a prompt:

pip freeze

You get a list of all the Python modules installed on your system.

b. Inspect the list, looking for an IBM Cloudant entry similar to the following example:

cloudant==2.14.0







 Step 1: Connecting to a service instance 

You must connect to your service instance before you create a database.

The following components are identified as normal import statements.

You can follow steps 1 - 5 to learn about the individual commands, or go to the end of the tutorial to [execute the Python script](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-creating-and-populating-a-simple-ibm-cloudant-database-on-ibm-cloudexecute-the-complete-python-script). When you finish, return to [Step 5. Retrieving data](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-creating-and-populating-a-simple-ibm-cloudant-database-on-ibm-cloudretrieving-data).



1. Run these import statements to connect to the service instance.

from cloudant.client import Cloudant
from cloudant.error import CloudantException
from cloudant.result import Result, ResultByKey
2. Find username, password, and URL in your Classic service credentials and replace serviceUsername, servicePassword, and serviceURL in the following example.

serviceUsername = "apikey-v2-58B528DF5397465BB6673E1B79482A8C"
servicePassword = "49c0c343d225623956157d94b25d574586f26d1211e8e589646b4713d5de4801"
serviceURL = "https://353466e8-47eb-45ce-b125-4a4e1b5a4f7e-bluemix.cloudant.com"
3. Establish a connection to the service instance.
Check that the client library installed successfully by running the following command at a prompt:

pip freeze

You get a list of all the Python modules installed on your system.

b. Inspect the list, looking for an IBM Cloudant entry similar to the following example:

cloudant==2.14.0







 Step 1: Connecting to a service instance 

You must connect to your service instance before you create a database.

The following components are identified as normal import statements.

You can follow steps 1 - 5 to learn about the individual commands, or go to the end of the tutorial to [execute the Python script](https://cloud.ibm.com/docs/services/Cloudant?topic=Cloudant-creating-and-populating-a-simple-ibm-cloudant-database-on-ibm-cloudexecute-the-complete-python-script). When you finish, return to [Step 5. Retrieving data](https://cloud.ibm.com/docs/services/Cloudant?topic=Cloudant-creating-and-populating-a-simple-ibm-cloudant-database-on-ibm-cloudretrieving-data).



1. Run these import statements to connect to the service instance.

from cloudant.client import Cloudant
from cloudant.error import CloudantException
from cloudant.result import Result, ResultByKey
2. Find username, password, and URL in your Classic service credentials and replace serviceUsername, servicePassword, and serviceURL in the following example.

serviceUsername = "apikey-v2-58B528DF5397465BB6673E1B79482A8C"
servicePassword = "49c0c343d225623956157d94b25d574586f26d1211e8e589646b4713d5de4801"
serviceURL = "https://353466e8-47eb-45ce-b125-4a4e1b5a4f7e-bluemix.cloudant.com"
3.
(https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-ibm-cloud-public)[IBM Cloudant security Describes IAM, security compliance, and securing your connection and data.](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-managing-access-for-cloudant)[Try IBM Cloudant for free Describes the steps to get started with IBM Cloudant for free.](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-getting-started-with-cloudant)

 Video library 

[![carousel thumbnail](https://cloud.ibm.com/docs-content/v1/content/Cloudant//images/cloudant-intro.png)<br><br>Introducing IBM Cloudant](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-learning-centercloudant-course-intro-video)[![carousel thumbnail](https://cloud.ibm.com/docs-content/v1/content/Cloudant//images/document.png)<br><br>The Document](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-learning-centerthe-document-video)[![carousel thumbnail](https://cloud.ibm.com/docs-content/v1/content/Cloudant//images/_id.png)<br><br>The _id](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-learning-centerthe-id-video)[![carousel thumbnail](https://cloud.ibm.com/docs-content/v1/content/Cloudant//images/rev-token.png)<br><br>The rev token](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-learning-centerthe-rev-token-video)[![carousel thumbnail
Getting started on IBM Cloud checklist 

Use these onboarding checklists to create and configure your IBM Cloud® account. This guide is intended to help you quickly navigate the available documentation to get your account set up, secure your cloud resources, track costs and billing, set up on-premises cloud connectivity, and help you efficiently meet your business needs in your IBM Cloud account.



 Explore the platform 

If you have little to no experience with IBM Cloud, or you need a refresher on the IBM Cloud platform, start with the following tasks.



Table 1. Getting started tasks for exploring the platform

 Task Description 

 <br><br> * Learn about the IBM Cloud platform<br><br><br> Review the [What is the IBM Cloud platform?](https://cloud.ibm.com/docs/overview?topic=overview-whatis-platform) documentation to get familiar. 
 <br><br> * Understand your options for working with resources in IBM Cloud<br><br><br> To create and manage resources in IBM Cloud, you can use any of the following tools:<br><br><br><br> * [IBM Cloud console](https://cloud.ibm.com/)<br> * [IBM Cloud Command Line Interface (CLI)](https://github.com/IBM-Cloud/ibm-cloud-cli-release)<br> * [IBM Cloud Shell](https://cloud.ibm.com/shell).<br> * [IBM Cloud Schematics](https://cloud.ibm.com/schematics)<br> * Each service offers a set of APIs and SDKs available as part of their documentation.<br><br><br> 
 <br><br> * Learn how to navigate the IBM Cloud console<br><br><br> The console is the user interface that you use to create and manage all your IBM Cloud resources. You can create a free account, log in, access documentation, access the catalog, view pricing information, get support, or check the status of IBM Cloud components.
If you modify this configuration and later want to use a user-provided Cloudant service, you either need to edit the configuration to cloudfoundry:cloudant or define cloudfoundry: with the name of your user-provided service.

Find your app in the IBM Cloud [resource list](https://cloud.ibm.com/resources). On the Service Details page for your app, click Connections in the sidebar. Click the IBM Cloudant menu icon (…) and select View credentials.

Copy and paste just the credentials to the corresponding fields in your local config.json file.

Build and run your app locally.

swift build

.build/debug/kitura-helloworld

View your app at: http://localhost:8080. Any names you enter into the app will now get added to the database.

This sample app uses the Kitura-CouchDB package to interact with Cloudant. [Learn more...](https://github.com/Kitura/Kitura-CouchDB)

Make any changes you want and re-deploy to IBM Cloud!

ibmcloud cf app push

View your app at the URL listed in the output of the push command, for example, myUrl.mybluemix.net.

Remember, if you don't need your app live, stop it so you don't incur any unexpected charges.





 Next steps 



* [Samples](https://ibm-cloud.github.io)
* [Architecture Center](https://www.ibm.com/cloud/architecture/architectures)