Python API Quickstart
Last updated
import os
from vbase_api import VBaseAPIClient
client = VBaseAPIClient(api_key=os.environ["VBASE_API_KEY"])client.create_collection(
name="daily-demand-forecasts",
description="Daily demand forecasts by region",
)as_of,region,predicted_demand
2025-01-31,north,127.4
2025-01-31,south,141.8stamp = client.create_stamp(
file="demand_forecast_2025-01-31.csv",
collection_name="daily-demand-forecasts",
)
print(stamp.commitment_receipt.timestamp)
print(stamp.commitment_receipt.transaction_hash)client.close()curl -X POST https://app.vbase.com/api/v1/stamps \
-H "Authorization: Bearer $VBASE_API_KEY" \
-F "collection_name=daily-demand-forecasts" \
-F "file=@demand_forecast_2025-01-31.csv" \
-F "store_stamped_file=true"