Skip to content

Gatey Python SDK. Works with Florgon hosted, or self-hosted server.

License

Notifications You must be signed in to change notification settings

florgon/gatey-sdk-py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Florgon Gatey SDK for Python (Official).

This is the official Python SDK for Florgon Gatey

Getting Started

Install

pip install --upgrade gatey-sdk

Configuration

import gatey_sdk
client = gatey_sdk.Client(
    project_id=PROJECT_ID,
    server_secret=PROJECT_SERVER_SECRET,
    client_secret=PROJECT_CLIENT_SECRET,
)
# Notice that you should only enter server or client secret, passing both have no effect as always server will be used.
# (as client not preferred if server secret is passed).

Usage

import gatey_sdk
client = gatey_sdk.Client(
    project_id=PROJECT_ID,
    server_secret=PROJECT_SERVER_SECRET,
)

# Will send message (capture).
client.capture_message("Hello Python Gatey SDK!", level="DEBUG")

# Will capture exception.
@client.catch()
def f():
    raise ValueError

# Same as above.
try:
    raise ValueError
except Exception as e:
    client.capture_exception(e)

# Will work by default also (see Client(handle_global_exceptions=True))
raise ValueError


# (Notice that events by default being sent not immediatly!)

Examples

See examples directory...

Integrations

See integrations directory...
See examples directory...

Documentation.

ReadTheDocs
Gatey Documentation

License

Licensed under the MIT license, see LICENSE