Blockhouse-app
  • Getting Started
    • SDK - File transfer
    • Trade Data Target Schema
  • Market Data Target Schema
Powered by GitBook
  1. Getting Started

SDK - File transfer

Overview

The Blockhouse SDK simplifies data transfers to Blockhouse infrastructure. Use it to seamlessly and securely send files to Blockhouse data warehouse.

Installing the SDK

Install the SDK using pip:

pip install blockhouse==1.0.16

Basic Usage

Here's a sample usage to get started:

from blockhouse import Transfer

# Initialize the client
transfer_client = Transfer("f6d8d388f0c3c1479d5b30cb43d5346d")

# Define the bucket name and file name
bucket_name = 'blockhouse-sdk' # Use this specific bucket name
file_name = "your_file"

# Transfer the file
file_upload_response = transfer_client.send_file(file_name, bucket_name)
print("File Upload Response:", file_upload_response)

Parameters

  • bucket_name: The target bucket in Blockhouse (i.e., blockhouse-sdk) is where the file will be uploaded. Please ensure you use this bucket.

  • file_name: The name of the file to transfer.

Outputs

  • If the file is successfully uploaded.

{
    "status": "success",
    "message": "file uploaded successfully."
}
  • If the file failed to upload.

{
    "status": "error",
    "message": "ERROR_DETAIL"
}

NextTrade Data Target Schema

Last updated 3 months ago

Page cover image