semvec/pypi-packages huggingface dataset:
amazon-kinesis-utils 0.1.8
amazon-kinesis-utils: a library of useful utilities for Amazon Kinesis
License: MIT

# amazon-kinesis-utils
A library of useful utilities for Amazon Kinesis

![](https://img.shields.io/badge/python-3.6+-blue.svg) 
[![PyPi version](https://img.shields.io/pypi/v/amazon-kinesis-utils.svg)](https://pypi.python.org/pypi/amazon-kinesis-utils/) 
![t](https://img.shields.io/badge/status-beta-orange.svg) 
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![Language grade: Python](https://img.shields.io/lgtm/grade/python/g/baikonur-oss/amazon-kinesis-utils.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/baikonur-oss/amazon-kinesis-utils/context:python)

[![CircleCI](https://circleci.com/gh/baikonur-oss/amazon-kinesis-utils.svg?style=svg)](https://circleci.com/gh/baikonur-oss/amazon-kinesis-utils)
[![codecov](https://codecov.io/gh/baikonur-oss/amazon-kinesis-utils/branch/master/graph/badge.svg)](https://codecov.io/gh/baikonur-oss/amazon-kinesis-utils)
[![Updates](https://pyup.io/repos/github/baikonur-oss/amazon-kinesis-utils/shield.svg)](https://pyup.io/repos/github/baikonur-oss/amazon-kinesis-utils/)
[![Documentation Status](https://readthedocs.org/projects/amazon-kinesis-utils/badge/?version=latest)](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
```console
$ 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
```
mtcping 0.1.4
Do tcping on many targets.
License: MIT
Keywords: command line utils,mtcping

# mtcping

Do tcping on many targets.

## Install

```shell
pip install mtcping
```

## Installed Command Utils

- mtcping


## Usage

```shell
[root@testsvr tmp]# mtcping --help
Usage: mtcping [OPTIONS] [PORT]...

Options:
  -t, --timeout INTEGER
  -i, --hosts-file TEXT  [required]
  -p, --ports-file TEXT
  -r, --retry INTEGER
  --help                 Show this message and exit.
```

## Example

```shell
C:\Code\mtcping>mtcping -i hosts.txt -p ports.txt
www.google.com   80    is closed
www.google.com   443   is closed
www.baidu.com    443   is open
www.qq.com       80    is open
www.qq.com       443   is open
www.baidu.com    80    is open

C:\Code\mtcping>type hosts.txt
www.baidu.com
www.qq.com
www.google.com

C:\Code\mtcping>type ports.txt
80
443

C:\Code\mtcping>mtcping -i hosts.txt 80 443
www.google.com   80    is closed
www.google.com   443   is closed
www.baidu.com    80    is open
www.baidu.com    443   is open
www.qq.com       443   is open
www.qq.com       80    is open

```

- We can load ports list from a file or form command arguments.
- We can load hosts list from a file or read from stdin.
  - Use "-" or "stdin" to read from sys.stdin. For example: `mtcping -i stdin 80`.

## Released

### v0.1.4 2020/04/01

- Add retry option.

### v0.1.3 2020/04/01

- Fix document.

### v0.1.2 2020/04/01

- Fix requirements.txt, remove all version.

### v0.1.1 2020/04/01

- Fix requirements.txt, use click<7.0 instead of click~=6.7, so that it can work for python2.6.

### v0.1.0 2020/04/01

- First release.