https://github.com/baikonur-oss/amazon-kinesis-utils
A Python library of useful utilities for Amazon Kinesis
https://github.com/baikonur-oss/amazon-kinesis-utils
amazon-kinesis aws-lambda aws-lambda-python kinesis-data-streams
Last synced: 3 months ago
JSON representation
A Python library of useful utilities for Amazon Kinesis
- Host: GitHub
- URL: https://github.com/baikonur-oss/amazon-kinesis-utils
- Owner: baikonur-oss
- License: mit
- Created: 2020-02-29T07:20:59.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-03-01T20:20:10.000Z (over 2 years ago)
- Last Synced: 2026-02-12T09:43:36.106Z (4 months ago)
- Topics: amazon-kinesis, aws-lambda, aws-lambda-python, kinesis-data-streams
- Language: Python
- Homepage: https://amazon-kinesis-utils.readthedocs.io/en/latest/
- Size: 90.8 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# amazon-kinesis-utils
A library of useful utilities for Amazon Kinesis

[](https://pypi.python.org/pypi/amazon-kinesis-utils/)

[](https://github.com/psf/black)
[](https://lgtm.com/projects/g/baikonur-oss/amazon-kinesis-utils/context:python)
[](https://circleci.com/gh/baikonur-oss/amazon-kinesis-utils)
[](https://codecov.io/gh/baikonur-oss/amazon-kinesis-utils)
[](https://pyup.io/repos/github/baikonur-oss/amazon-kinesis-utils/)
[](https://amazon-kinesis-utils.readthedocs.io/en/latest/?badge=latest)
## Reference
See: https://amazon-kinesis-utils.readthedocs.io/en/latest/
## Usage
```python
# import submodule you want to use with from import
from amazon_kinesis_utils import kinesis
def lambda_handler(event, context):
raw_records = event['Records']
# kinesis.parse_records parses aggregated/non-aggregated records, with or without gzip compression
# it even unpacks CloudWatch Logs subscription filters messages
for payload in kinesis.parse_records(raw_records):
# kinesis.parse_records is a generator, so we only have one payload in memory on every iteration
print(f"Decoded payload: {payload}")
```
## Contributing
Make sure to have following tools installed:
- [pre-commit](https://pre-commit.com/)
- Sphinx for docs generation
### macOS
```shell
$ brew install pre-commit
# set up pre-commit hooks by running below command in repository root
$ pre-commit install
# install sphinx
$ pip install sphinx sphinx_rtd_theme
```