Skip to main content Link Menu Expand (external link) Document Search Copy Copied

How do I use FeatureBase Python classes to connect to Cloud?

Use the following client classes to connect to FeatureBase Cloud.

Before you begin

Syntax

# Import required libraries
import featurebase

# Connect to FeatureBase cloud
client = featurebase.client(
  hostport = "query.featurebase.com/v2",
  database = "<database-id>",
  apikey = "<api-key-secret>",
  timeout = "<int-value>")

Required libraries

import featurebase is required. Add other libraries as necessary.

Connect to FeatureBase Cloud

Keywords Description Required Additional information
client = featurebase.client Defines featurebase.client and optional flags Yes  
hostport = "query.featurebase.com/v2" Default Cloud query endpoint, found in Database details page Yes  
database FeatureBase Cloud database ID found in Database details page Yes Obtain database ID from Database details
apikey Cloud API key secret key Yes Create a Cloud API key
timeout Integer value that represents number of seconds before connection timeout Optional  

Next step