Connectors
Connectors
Integrate Beam with supported object storage and HTTP providers.
Connectors are client SDK helpers for preparing transfers from storage providers. They run in the SDK process, keep provider credentials local, create task-scoped source and destination access, and submit the prepared transfer to BeamCore.
Workers never receive your provider credentials: they move bytes between your storage endpoints using only the short-lived access the SDK signed for their chunk.
Unrestricted credentials
Source and destination credentials must not be restricted by IP address or network.
TypeScript SDK
Install:
npm install @beam-network/sdkExample:
import { BeamClient, R2ProviderConfig, S3ProviderConfig } from "@beam-network/sdk";
const beam = new BeamClient({ apiKey: process.env.BEAM_API_KEY! });
const transfer = await beam.createTransfer({
sources: [
R2ProviderConfig.create({
bucket: "source-bucket",
key: "exports/report.parquet",
account_id: process.env.R2_ACCOUNT_ID,
access_key_id: process.env.R2_ACCESS_KEY_ID!,
secret_access_key: process.env.R2_SECRET_ACCESS_KEY!,
}),
],
destinations: [
S3ProviderConfig.create({
bucket: "destination-bucket",
key: "imports/report.parquet",
region: "us-east-1",
access_key_id: process.env.AWS_ACCESS_KEY_ID!,
secret_access_key: process.env.AWS_SECRET_ACCESS_KEY!,
}),
],
name: "r2-to-s3-report",
});
const status = await beam.waitForTransfer(transfer.transfer_id, { timeoutMs: 3_600_000 });
console.log(status.status);Python SDK
Install:
pip install "beam-network-sdk[s3]"Example:
import asyncio
import os
from beam_network_sdk import BeamSDK
from beam_network_sdk.models import S3ProviderDestination, S3ProviderSource
async def main() -> None:
async with BeamSDK(api_key=os.environ["BEAM_API_KEY"]) as beam:
transfer = await beam.transfers.create_transfer(
sources=[
S3ProviderSource(
bucket="source-bucket",
key="exports/report.parquet",
region="us-east-1",
access_key_id=os.environ["AWS_ACCESS_KEY_ID"],
secret_access_key=os.environ["AWS_SECRET_ACCESS_KEY"],
)
],
destinations=[
S3ProviderDestination(
bucket="dest-bucket",
key="imports/report.parquet",
region="us-east-1",
access_key_id=os.environ["AWS_ACCESS_KEY_ID"],
secret_access_key=os.environ["AWS_SECRET_ACCESS_KEY"],
)
],
)
print(transfer.transfer_id)
asyncio.run(main())create_transfer hands the transfer to the network as soon as it is prepared.
Supported Provider Models
| Provider | TypeScript | Python |
|---|---|---|
| Amazon S3 | S3ProviderConfig | S3ProviderSource, S3ProviderDestination |
| Cloudflare R2 | R2ProviderConfig | R2ProviderSource, R2ProviderDestination |
| S3-compatible | S3CompatibleProviderConfig | S3CompatibleProviderSource, S3CompatibleProviderDestination |
| Hippius | HippiusProviderConfig | HippiusProviderSource, HippiusProviderDestination |
| Box | BoxProviderConfig, boxFolderSources, BoxDestinationConfig | BoxProviderSource, box_folder_sources, BoxProviderDestination |
| HTTP | Raw sources[] / destinations[] transfer configs | SourceConfig, DestConfig |
| Google Cloud Storage | Not supported yet | Not supported yet |