IBM Streams Cloud Object Storage integration
Project description
Overview
Provides functions to read objects from Cloud Object Storage as a stream and submit tuples to create objects in Cloud Object Storage (COS).
IBM Cloud Object Storage makes it possible to store practically limitless amounts of data, simply and cost effectively. It is commonly used for data archiving and backup, web and mobile applications, and as scalable, persistent storage for analytics.
Sample
A simple hello world example of a Streams application writing string messages to an object. Scan for created object on COS and read the content:
from streamsx.topology.topology import * from streamsx.topology.schema import CommonSchema from streamsx.topology.context import submit import streamsx.objectstorage as cos topo = Topology('ObjectStorageHelloWorld') to_cos = topo.source(['Hello', 'World!']) to_cos = to_cos.as_string() # sample bucket with resiliency "regional" and location "us-south" bucket = 'streamsx-py-sample' # US-South region private endpoint endpoint='s3.private.us-south.cloud-object-storage.appdomain.cloud' # Write a stream to COS cos.write(to_cos, bucket, endpoint, '/sample/hw%OBJECTNUM.txt') scanned = cos.scan(topo, bucket=bucket, endpoint=endpoint, directory='/sample') # read text file line by line r = cos.read(scanned, bucket=bucket, endpoint=endpoint) # print each line (tuple) r.print() submit('STREAMING_ANALYTICS_SERVICE', topo)
Documentation
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for streamsx.objectstorage-1.0b1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e822e627b24d62f5ff55750597bef6449799e2ccabd5c6299ac9a5a596568a2d |
|
MD5 | 67b035fc6c052ebf18529623016f6b2c |
|
BLAKE2b-256 | 16818209956b764e3c81088b1d40c9ad19b39f09b64c656d404904f0890ce425 |
Close
Hashes for streamsx.objectstorage-1.0b1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 79f341b25e0e115fd2253235bf206e91eaa4d516bedffb40b204b82c56b6c1e7 |
|
MD5 | c80c619eb67a82544646c04fc3ff86c0 |
|
BLAKE2b-256 | 636b83374373e2cea4ce4c8d01b0f2bb72fe9c63a39186e738b89bf506c3c528 |