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

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

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

Uploaded Python 3

File details

Details for the file ClearInsights-0.1.9-py3-none-any.whl.

File metadata

  • Download URL: ClearInsights-0.1.9-py3-none-any.whl
  • Upload date:
  • Size: 4.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.17

File hashes

Hashes for ClearInsights-0.1.9-py3-none-any.whl
Algorithm Hash digest
SHA256 2a5e1f7b1687165948c977053d2b12c11c882e671fb0efbedefd66eab5929887
MD5 853a7ef944a878a1eab6d7d591b20ac0
BLAKE2b-256 367099e09da9dc83a3a0741859e5e498ba2bd57d111d9b424699c05f81660ccd

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