Skip to main content

A Python client for Superleap API

Project description

Superleap Python SDK

Python SDK for clients to interact with Superleap

Audit Data

Clients can poll audit-data (data-change logs) from Superleap using this sdk.

Installation

You can install the package using pip:

pip install superleap-sdk

Usage

from superleap-sdk import SuperleapClient

# Initialize the SDK

def handle_changes(changes: list[ObjectAuditData], mark_as_read, commit) -> None: # Worry about the type of mark_as_read later
    for change in changes:
        for data in change.audit_data_list:
            print(data.random_id)
            mark_as_read(data.get_object_pointer()) ## Latest data that is marked as read will be counted

client = SuperleapClient(Environment.LOCAL,"your-api-key")
sc.add_object(Object("lead",None))
sc.set_handler(handle_changes)

# Poll for updates
sc.poll_audit_data()

Development

To set up the development environment:

  1. Clone the repository
  2. Create a virtual environment
  3. Install development dependencies:
    pip install -e ".[dev]"
    

License

This project is licensed under the MIT License - see the LICENSE file for details.

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

superleap_sdk-0.1.0.tar.gz (2.2 MB view details)

Uploaded Source

Built Distribution

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

superleap_sdk-0.1.0-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file superleap_sdk-0.1.0.tar.gz.

File metadata

  • Download URL: superleap_sdk-0.1.0.tar.gz
  • Upload date:
  • Size: 2.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.9.6

File hashes

Hashes for superleap_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 55dc9534fc41733e7ee3a3916a81a14ffa659df165a8168e0ffe886edd1e0f18
MD5 226d2fa1581b24fdf1cdde51c6036fc9
BLAKE2b-256 05aa8d71dba048a7deac1a4bedb5c085d5f25a9b6e77d8604fc3c39ac20a31f7

See more details on using hashes here.

File details

Details for the file superleap_sdk-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: superleap_sdk-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.9.6

File hashes

Hashes for superleap_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 693030ba4355c6679db6f6a38bf1b2dd440548ba2ab9b97882efbf143153796d
MD5 fe9de8a7120d1a4efeee40f71891894b
BLAKE2b-256 4ab17670c9bcdd894493f2477b0048762198cd8b84357bbc7164882318e904ed

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