Skip to main content

skylog python sdk

Project description

skylog-sdk

Release Build status Commit activity License

Python SDK for Skylog Integration

Skylog is a robust service designed for seamless integration with various platforms like Sentry, Telegram, and more, enabling the efficient transmission of logs and rapid identification of issues.

This Python SDK facilitates easy interaction with Skylog services, allowing users to:

  • fire alert
  • stop alert
  • notify

How to install

install from gitlab

pip install skylog-sdk

Setup and Configuration

  • Environment Variables: Configure the following variables in your project environment:

    • DEFAULT_SKY_LOG_ALERTING_TELEGRAM_ALERT_NAME: Default alert name for Telegram
    • DEFAULT_SKY_LOG_ALERTING_PHONE_CALL_ALERT_NAME: Default alert name for phone calls
    • DEFAULT_SKY_LOG_ALERTING_SMS_ALERT_NAME: Default alert name for SMS
    • SKY_LOG_ALERTING_BASE_URL: Base URL for Skylog API calls
    • SKY_LOG_ALERTING_TOKEN: Your Skylog authentication token
  • Proxy Configuration: If using a proxy, include the following additional variables:

    • PROXY_USERNAME
    • PROXY_PASSWORD
    • PROXY_IP
    • PROXY_PORT

Usage Example

from skylog import AlertingSkyLogClient, AlertingProvider

# Initialize the Skylog client with the desired provider (e.g., Telegram)
client = AlertingSkyLogClient(provider=AlertingProvider.telegram)

# Example Operations:
client.fire_alert(description='Issue detected', instance_name='unique_key', provider=AlertingProvider.sms)
client.stop_alert(description='Issue resolved', instance_name='unique_key', provider=AlertingProvider.sms)
client.notify(description='Alert notification', instance_name='unique_key', provider=AlertingProvider.telegram)

Concepts to Understand

Alertname and Instance

  • Alertname: Represents the provider or service. It identifies where Skylog sends alerts.
  • Instance: A unique identifier within a group alert, specifying a particular part of a universal alert.

Alerts Management

  • Firing an Alert: Triggering an alert, resulting in immediate notifications sent to relevant endpoints.
  • Stopping an Alert: Removing a fired alert, resolving it and stopping further notifications.
  • Notifying an Alert: Sending messages to endpoints without adding records to the triggered list.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

skylog_sdk-0.1.15.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

skylog_sdk-0.1.15-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

Details for the file skylog_sdk-0.1.15.tar.gz.

File metadata

  • Download URL: skylog_sdk-0.1.15.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.1 CPython/3.11.11 Linux/6.8.0-1017-azure

File hashes

Hashes for skylog_sdk-0.1.15.tar.gz
Algorithm Hash digest
SHA256 9df4abc0e15babf40158e6abb77364edd98d54ffa9e26222e61f3905d21c4f73
MD5 1ec1efaa3b908daa86617ae3d36d6edc
BLAKE2b-256 dbcceab8dfdad4e3cd869e8283123820902b3148d9a40158bf4b691da340d5b3

See more details on using hashes here.

File details

Details for the file skylog_sdk-0.1.15-py3-none-any.whl.

File metadata

  • Download URL: skylog_sdk-0.1.15-py3-none-any.whl
  • Upload date:
  • Size: 8.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.1 CPython/3.11.11 Linux/6.8.0-1017-azure

File hashes

Hashes for skylog_sdk-0.1.15-py3-none-any.whl
Algorithm Hash digest
SHA256 52c8e3f5c4b557c799ee309f70c68a493a5abaefa09cc7dcc020b4f552313429
MD5 eb0c97fc2b6dd9abe3ad32b565e93d02
BLAKE2b-256 21f5076bd571f04624ff2390780b4e7c2e2ec2e1d25b2dc92ae6b06032e357a8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page