The all-in-one monitoring app for smart devs (https://streply.com)
Project description
Official Streply SDK for Python
Getting started
Install
pip install --upgrade streply-sdk
Initialization
from streply.streply import streply
streply('https://clientPublicKey@api.streply.com/projectId', {
'environment': 'local',
'release': 'my-project-name@2.3.12',
})
Usage
from streply.capture import exception
# handled exception
try:
raise NotImplementedError("Not implemented error")
except Exception as e:
exception(e)
# Streply will also capture unhandled exception
raise ValueError("Sorry, no numbers below zero")
Exception with error level:
from streply.capture import exception
from streply.enum.level import level
try:
raise NotImplementedError("Not implemented error")
except Exception as e:
exception(e, {}, level.CRITICAL)
Logs
from streply.utils import logger
logger.debug("A debug message")
logger.info("An info message")
logger.warning("A warning message")
logger.error("An error message")
logger.critical("A critical message")
Adding params to log:
from streply.utils import logger
logger.info("A info message", {
'userName': 'Joey'
})
Activity
from streply.capture import activity
activity('auth.register', {
'userName': 'Joey'
})
Configuration
Adding user data
from streply.streply import streply
streply = streply('https://clientPublicKey@api.streply.com/projectId')
streply.set_user('ID')
# or with username
streply.set_user('ID', 'Joey')
or with parameters and name
from streply.streply import streply
streply = streply('https://clientPublicKey@api.streply.com/projectId')
streply.set_user('ID', 'Joey', {
'createdAt': '2022-11-10 15:10:32'
})
Capture levels
level.CRITICAL
level.HIGH
level.NORMAL
level.LOW
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
streply_sdk-0.0.3.tar.gz
(8.1 kB
view details)
Built Distribution
File details
Details for the file streply_sdk-0.0.3.tar.gz
.
File metadata
- Download URL: streply_sdk-0.0.3.tar.gz
- Upload date:
- Size: 8.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 22ad544c4c70c8db675303451d7b84554d0a7f1f0058968b9c7f2936bdc1dd83 |
|
MD5 | 0778191db3f3fbc5c40864633046108b |
|
BLAKE2b-256 | cc5f56e142e10021be1a9bc078345ab275f4aa6418c84597af43f0aae4d5b453 |
File details
Details for the file streply_sdk-0.0.3-py3-none-any.whl
.
File metadata
- Download URL: streply_sdk-0.0.3-py3-none-any.whl
- Upload date:
- Size: 10.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fecb1131e8d3febc47ce62330355290a3cd24febf3f4d1a4d8737c74767868c3 |
|
MD5 | 7797a79f882844e7a406852aa9b5afc6 |
|
BLAKE2b-256 | 49c1ef04faebfbe46aa186b3d502b4a66bf81a20f5ebbd2d045f0f303cf6efec |