Skip to main content

A portable class Library for the ClearInsights API. (Official Library)

Project description

Introduction

An example of how to use the ClearInsights package within your python applications

Getting Started

Prerequisites

Install the ClearInsights Package

  • Package Manager
    pip install ClearInsights
    

Installation

Create a free ClearInsights account to start using the python package

  1. Get a free account at https://clearinsights.io and retrieve your API Key under the Administration ->APIKey menu.
  2. Create at least 1 product and 1 environment and retrieve the Client Secret for the product/environment.
  3. Import ClearInsights
    import ClearInsights
    
  4. Initialize and use ClearInsights Logger class
     log = ClearInsights.Logger(apiKey = "{ApiKey}", clientSecret = "{ClientSecret}", applicationName = "{ApplicationName, Ex. My First App}")
     log.LogInformation("App started");
    
  5. Use global exception handling.
     def my_except_hook(exctype, error, error_traceback):    
       log = ClearInsights.Logger(apiKey = "{ApiKey}", clientSecret = "{ClientSecret}", applicationName = "{ApplicationName, Ex. My First App}")
       log.LogError(error)
    
     def main():    
       sys.excepthook = my_except_hook
    

Usage

Use this app as an example of how to use the ClearInsights package within your python applications.

For more examples, please refer to the Documentation

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

ClearInsights-0.1.9-py3-none-any.whl (4.1 kB view hashes)

Uploaded Python 3

Supported by

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