Metadata-Version: 2.1
Name: kines
Version: 0.0.1
Summary: Friendly Amazon Kinesis Stream Command Line Interface
Home-page: https://github.com/dinsaw/kinesis-utils
Author: Dinesh Sawant
Author-email: dineshsawant300@gmail.com
License: UNKNOWN
Description: ## Kines
        Friendly Amazon Kinesis Stream Command Line Interface
        
        #### Install
        - `pip install kines`
        
        #### Setup 
        - `aws configure`
        
        #### Features 
        ##### List all Kinesis Stream
        - `kines ls`
        ```commandline
        > kines ls
        Using boto3 version 1.9.230
        Found 20 streams.
        Status - Stream = Stream with Status. # = OpenShardCount. 👥 = EnhancedConsumerCount. 🕑 = RetentionPeriod. 🔑 = EncryptionType.
        ┌──────────────────────────────────────┬───┬────┬────┬──────┐
        │ Status - Stream                      │ # │ 👥 │ 🕑 │ 🔑   │
        ├──────────────────────────────────────┼───┼────┼────┼──────┤
        │ ⛹  prod-clickstream                  │ 8 │ 0  │ 24 │ NONE │
        │ ⛹  uat-clickstream                   │ 1 │ 0  │ 24 │ NONE │
        └──────────────────────────────────────┴───┴────┴────┴──────┘
        ```
        
        ##### List all Kinesis Stream
        - `kines ls <stream-name>`
        ```commandline
        > kines lss -s prod-clickstream
        Using boto3 version 1.9.230
        ┌─────────────────┬───────────────┬───────────────────────┬────────────────┐
        │ ShardId         │ ParentShardId │ AdjacentParentShardId │ % HashKeyRange │
        ├─────────────────┼───────────────┼───────────────────────┼────────────────┤
        │ 📖 000000000007 │ 000000000003  │                       │ 12.5%          │
        │ 📖 000000000008 │ 000000000003  │                       │ 12.5%          │
        │ 📖 000000000009 │ 000000000004  │                       │ 12.5%          │
        │ 📖 000000000010 │ 000000000004  │                       │ 12.5%          │
        │ 📖 000000000011 │ 000000000005  │                       │ 12.5%          │
        │ 📖 000000000012 │ 000000000005  │                       │ 12.5%          │
        │ 📖 000000000013 │ 000000000006  │                       │ 12.5%          │
        │ 📖 000000000014 │ 000000000006  │                       │ 12.5%          │
        └─────────────────┴───────────────┴───────────────────────┴────────────────┘
        ```
        - For detailed output `kines ls <stream-name> -d`
        ```commandline
        > kines lss -s prod-clickstream -d
        Using boto3 version 1.9.230
        ┌─────────────────┬───────────────┬───────────────────────┬────────────────┬─────────────────────────────────────────┬─────────────────────────────────────────┐
        │ ShardId         │ ParentShardId │ AdjacentParentShardId │ % HashKeyRange │ StartingHashKey                         │ EndingHashKey                           │
        ├─────────────────┼───────────────┼───────────────────────┼────────────────┼─────────────────────────────────────────┼─────────────────────────────────────────┤
        │ 📖 000000000007 │ 000000000003  │                       │ 12.5%          │ 0                                       │ 42535295865117307932921825928971026431  │
        │ 📖 000000000008 │ 000000000003  │                       │ 12.5%          │ 42535295865117307932921825928971026432  │ 85070591730234615865843651857942052863  │
        │ 📖 000000000009 │ 000000000004  │                       │ 12.5%          │ 85070591730234615865843651857942052864  │ 127605887595351923798765477786913079295 │
        │ 📖 000000000010 │ 000000000004  │                       │ 12.5%          │ 127605887595351923798765477786913079296 │ 170141183460469231731687303715884105727 │
        │ 📖 000000000011 │ 000000000005  │                       │ 12.5%          │ 170141183460469231731687303715884105728 │ 212676479325586539664609129644855132159 │
        │ 📖 000000000012 │ 000000000005  │                       │ 12.5%          │ 212676479325586539664609129644855132160 │ 255211775190703847597530955573826158591 │
        │ 📖 000000000013 │ 000000000006  │                       │ 12.5%          │ 255211775190703847597530955573826158592 │ 297747071055821155530452781502797185023 │
        │ 📖 000000000014 │ 000000000006  │                       │ 12.5%          │ 297747071055821155530452781502797185024 │ 340282366920938463463374607431768211455 │
        └─────────────────┴───────────────┴───────────────────────┴────────────────┴─────────────────────────────────────────┴─────────────────────────────────────────┘
        ```
        
        
        ##### Find shard for partition key
        - `kines grep -s prod-clickstream -p 123455 -p 8900`
        ```commandline
        > kines grep -s prod-clickstream -p 123455 -p 8900
        Using boto3 version 1.9.230
        ┌──────────────┬──────────────────────────────────┬─────────────────────────────────────────┬─────────────────┐
        │ PartitionKey │ MD5PartitionKey                  │ HashKey                                 │ ShardId         │
        ├──────────────┼──────────────────────────────────┼─────────────────────────────────────────┼─────────────────┤
        │ 123455       │ 00c66aaf5f2c3f49946f15c1ad2ea0d3 │ 1030238607790890479260410494606811347   │ 📖 000000000007 │
        │ 8900         │ eedc6ed006e6f49a7010013cc1fd8a3f │ 317500815852337962583846441353507342911 │ 📖 000000000014 │
        └──────────────┴──────────────────────────────────┴─────────────────────────────────────────┴─────────────────┘
        ```
        
        #### Get report for your Kinesis Stream
        - `kines report -s <stream-name> -h <number-of-hours> -p <metric-period-in-minutes>`
        ```commandline
        kines report -s prod-clickstream -h 3
        Using boto3 version 1.9.230
        Time = Converted Local Time. IR = IncomingRecords. IS = IncomingSize. IR/Sec = IncomingRecords Per Sec. GR = GetRecords.Records. GR/Sec = GetRecords.Records/Sec. GR/IR = GetRecords/IncomingRecords. WPTE = WriteProvisionedThroughputExceeded. RPTE = ReadProvisionedThroughputExceeded. MAX(IAGM) = MAX(IteratorAgeMilliSeconds).
        ┌──────────────────┬─────────┬───────────┬────────┬──────────┬────────┬───────┬──────┬─────────┬───────────┐
        │ Time             │ IR      │ IS        │ IR/Sec │ GR       │ GR/Sec │ GR/IR │ WPTE │ RPTE    │ MAX(IAGM) │
        ├──────────────────┼─────────┼───────────┼────────┼──────────┼────────┼───────┼──────┼─────────┼───────────┤
        │ 2019-09-23 13:30 │ 63564.0 │ 192.4 MB  │ 70.63  │ 444774.0 │ 494.19 │ 7.00  │ 0.0  │ 6.0 🔥  │ 0.0       │
        │ 2019-09-23 13:45 │ 65641.0 │ 198.67 MB │ 72.93  │ 459252.0 │ 510.28 │ 7.00  │ 0.0  │ 7.0 🔥  │ 0.0       │
        │ 2019-09-23 14:00 │ 65451.0 │ 198.45 MB │ 72.72  │ 458541.0 │ 509.49 │ 7.01  │ 0.0  │ 1.0 🔥  │ 0.0       │
        │ 2019-09-23 14:15 │ 66479.0 │ 202.04 MB │ 73.87  │ 465438.0 │ 517.15 │ 7.00  │ 0.0  │ 5.0 🔥  │ 0.0       │
        │ 2019-09-23 14:30 │ 71354.0 │ 216.3 MB  │ 79.28  │ 499529.0 │ 555.03 │ 7.00  │ 0.0  │ 2.0 🔥  │ 0.0       │
        │ 2019-09-23 14:45 │ 71284.0 │ 216.07 MB │ 79.20  │ 498896.0 │ 554.33 │ 7.00  │ 0.0  │ 4.0 🔥  │ 0.0       │
        │ 2019-09-23 15:00 │ 98094.0 │ 293.68 MB │ 108.99 │ 686561.0 │ 762.85 │ 7.00  │ 0.0  │ 8.0 🔥  │ 0.0       │
        │ 2019-09-23 15:15 │ 85521.0 │ 258.77 MB │ 95.02  │ 598670.0 │ 665.19 │ 7.00  │ 0.0  │ 2.0 🔥  │ 0.0       │
        │ 2019-09-23 15:30 │ 78926.0 │ 236.83 MB │ 87.70  │ 552504.0 │ 613.89 │ 7.00  │ 0.0  │ 2.0 🔥  │ 0.0       │
        │ 2019-09-23 15:45 │ 82719.0 │ 251.19 MB │ 91.91  │ 578759.0 │ 643.07 │ 7.00  │ 0.0  │ 14.0 🔥 │ 0.0       │
        │ 2019-09-23 16:00 │ 75329.0 │ 228.95 MB │ 83.70  │ 527481.0 │ 586.09 │ 7.00  │ 0.0  │ 2.0 🔥  │ 0.0       │
        │ 2019-09-23 16:15 │ 73013.0 │ 221.95 MB │ 81.13  │ 511282.0 │ 568.09 │ 7.00  │ 0.0  │ 5.0 🔥  │ 0.0       │
        │ 2019-09-23 16:30 │ 73048.0 │ 222.1 MB  │ 81.16  │ 511147.0 │ 567.94 │ 7.00  │ 0.0  │ 2.0 🔥  │ 0.0       │
        │ 2019-09-23 16:45 │ 54229.0 │ 165.09 MB │ 60.25  │ 379756.0 │ 421.95 │ 7.00  │ 0.0  │ 2.0 🔥  │ 0.0       │
        └──────────────────┴─────────┴───────────┴────────┴──────────┴────────┴───────┴──────┴─────────┴───────────┘
        ```
        
        #### How to build in Dev?
        - `venv/bin/kines_cli`
        - `. venv/bin/activate`
        - `pip install --editable .`
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown
