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.

This package is compatible with Streaming Analytics service on IBM Cloud:

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)

Documentation

Project details


Download files

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

Source Distribution

streamsx.inet-0.2.0.tar.gz (4.3 kB view hashes)

Uploaded Source

Built Distribution

streamsx.inet-0.2.0-py2.py3-none-any.whl (10.9 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page