Serverless SDK for Python
Project description
serverless-sdk
Serverless Console SDK for Python
Use case
Environment agnostic Serverless Console instrumentation functions for Python applications.
This library is safe to use without side-effects in any Python application. It becomes effective once (one of the listed below) environment specific SDK is loaded on top.
Environment extensions
- AWS Lambda - serverless-aws-lambda-sdk
Installation
pip install serverless-sdk
Usage
from serverless_sdk import serverlessSdk
print(serverlessSdk.name)
print(serverlessSdk.version)
serverlessSdk.capture_error(Exception("Unexpected"))
Setup
1. Register with Serverless Console
2. Initialize and setup SDK specific to your enviroment
2.1 Configuration options
Common options supported by all environments:
SLS_ORG_ID
(or options.orgId
)
Required setting. Id of your organization in Serverless Console.
SLS_DISABLE_CAPTURED_EVENTS_STDOUT
(or options.disableCapturedEventsStdout
)
Disable writing captured events registered via .capture_error
and .capture_warning
to stdout
Instrumentation
This package comes with instrumentation for following areas.
Note: instrumentation is enabled via environment specific SDK instance, relying just on serverless-sdk
doesn't enable any instrumentation)
- N/A
API
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for serverless_sdk-0.3.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d8bd5b21cc30a2d9944b5f946ca9f6cd79a77f3a298a75461870e728417ad4e5 |
|
MD5 | e8a582315580e9c42d9429ea28773262 |
|
BLAKE2b-256 | 977e5eeed0025b2a4efe927fa01d9e740086c261c25e9e87e69093fef46cd1c5 |