Skip to main content

IBM Streams Internet protocol integration

Project description

Overview

Provides functions to run HTTP requests.

This package exposes the com.ibm.streamsx.inet toolkit as Python methods for use with Streaming Analytics service on IBM Cloud and IBM Streams including IBM Cloud Pak for Data.

Sample

A simple example of a Streams application that emits http requests:

from streamsx.topology.topology import *
from streamsx.topology.schema import CommonSchema, StreamSchema
from streamsx.topology.context import submit
import streamsx.inet as inet

topo = Topology()

# HTTP GET REQUEST
s1 = topo.source(['http://httpbin.org/get']).as_string()
result_http_get = inet.request_get(s1)
result_http_get.print()

# HTTP PUT REQUEST
s2 = topo.source(['hello world']).as_string()
result_http_put = inet.request_put(s2, url='http://httpbin.org/put', content_type='text/plain')
result_http_put.print()

submit('STREAMING_ANALYTICS_SERVICE', topo)
# Use for IBM Streams including IBM Cloud Pak for Data
# submit ('DISTRIBUTED', topo)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
streamsx.inet-1.1.1-py2.py3-none-any.whl (11.2 kB) Copy SHA256 hash SHA256 Wheel 3.5
streamsx.inet-1.1.1.tar.gz (4.6 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page