Kinesis Logger Stream Handler
This package contains
AwsSessionManagement - handles AWS Session with AWS Temp credentials by Assuming a given Role it renews the temp credentials when needed
AWS Kinesis Logger StreamHandler - a logging streamhandler which can send logs to AWS Kinesis
Usage:
def get_kinesis_client(aws_access_key_id, aws_secret_access_key, aws_session_token):
logger.info("creating/updating kinesis client ...")
kinesis = boto3.client('kinesis', region_name=get_region(),
aws_access_key_id = aws_access_key_id,
aws_secret_access_key = aws_secret_access_key,
aws_session_token = aws_session_token)
logger.info("returning new kinesis client")
return kinesis
logger = logging.getLogger("my-package")
logger.setLevel(logging.INFO)
kinesisAwsSessionManagement = AwsSessionManagement(role_arn='roleArnValue',
external_id='externalIdValue',
func=get_kinesis_client,
role_session_name="KinesisSession")
kinesis_stream_handler = KinesisDataStreamHandler(kinesis_stream_name, 'subsystem_value', 'component_value', 'action_value', 'project_name', 'env', 'version', kinesisAwsSessionManagement)
kinesis_stream_handler.setLevel(logLevel)
logger.addHandler(kinesis_stream_handler)
Now, every logging call will send the logs both to console and kinesis data stream with a given 'kinesis_stream_name'
Metadata
Release files for kinesis-logger-streamhandler 0.0.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| kinesis-logger-streamhandler-0.0.8.tar.gz | 3.5 kB | Without provenance | Details for kinesis-logger-streamhandler-0.0.8.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| kinesis_logger_streamhandler-0.0.8-py3-none-any.whl | Python 3 | none | any | Details for kinesis_logger_streamhandler-0.0.8-py3-none-any.whl |
Total release size: 7.6 kB
Release files / kinesis-logger-streamhandler-0.0.8.tar.gz
| Download URL | kinesis-logger-streamhandler-0.0.8.tar.gz |
|---|---|
| Size | 3.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
30bf14f58a93047d8824f5797e331978a03a15547e432bc235e698727a0fdae9
|
|
BLAKE2b-256 checksum How to use checksums |
4943094c852b97530d476922d73ddd305cb82ec35a4408b0ec71ee6c42153583
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.2
|
Release files / kinesis_logger_streamhandler-0.0.8-py3-none-any.whl
| Download URL | kinesis_logger_streamhandler-0.0.8-py3-none-any.whl |
|---|---|
| Size | 4.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
980a3e2f43899c436de1aed0be8c66a5de3abd16afb88baf7f343cc8da126b9b
|
|
BLAKE2b-256 checksum How to use checksums |
208d6123ec8d52044a4899e61e0d329e7a22d33d4aa770a8491ed386afb5b9e4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.2
|
Security for kinesis-logger-streamhandler 0.0.8
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.