Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Kinesis utilities

Project Description

Miscellaneous utilities for AWS Kinesis.


pip install kinesisutils

To install the development version:

pip install git+


At the moment there is only one utility implemented: a Python generator that reads records from a Kinesis stream. You can use it like this:

import json

from kinesisutils.kinesisutils import KinesisGenerator

# Hit Kinesis with at most 10 requests per second, usin json.loads to
# deserialize the Kinesis records (the default). You could deactivate record
# deserialization by setting des=None.
kg = KinesisGenerator("stream_name", rqs=10, des=json.loads)

for rec in kg:

By default the generator will keep pulling records from Kinesis for 60 seconds. You can customize this timeout if you want:

from kinesisutils.kinesisutils import KinesisGenerator

kg = KinesisGenerator("stream_name", timeout=30)

for rec in kg:

If you are using the Kinesis generator to read Cloudwatch log events that are being forwarded to a Kinesis stream using a [logs subscription][logsubs] you will need to decompress the Cloudwatch records before deserializing them:

import decompress
import json

kg = KinesisGenerator("stream_name", rqs=10, des=json.loads,

for rec in kg:


If you have questions, bug reports, suggestions, etc. please create an issue on the GitHub project page. PRs are also welcome.


This software is licensed under the MIT license.

See License file.

© 2017 German Gomez-Herrero, Find Hotel and others.

Release History

This version
History Node


History Node


History Node


History Node


History Node


History Node


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
(3.5 kB) Copy SHA256 Hash SHA256
Source None May 28, 2017

Supported By

Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Google Google Cloud Servers