Python

circle-info

The Hackle Python SDK supports Python 3 and above.

If you are using a WSGI environment, be sure to check the WSGI Configuration guide.

Add Dependency

arrow-up-right

pip install hackle-sdk

SDK Initialization

triangle-exclamation

hackle_client is the class that provides methods for using SDK features.

To use the SDK, you need to initialize hackle_client.

Instantiation

Instantiate hackle_client by passing the SDK Key. hackle_client periodically synchronizes with the Hackle server as a background task to obtain the necessary information.

Shutdown

When the application shuts down, you must shut down hackle_client using the hackle_client.close() method. This releases resources in use and sends any remaining events.

triangle-exclamation

Using Flask or Django?

You can use @atexit.register to automatically shut down hackle_client when the application exits.

Last updated