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:
- Clone the repository
- Create a virtual environment
- Install development dependencies:
pip install -e ".[dev]"
License
This project is licensed under the MIT License - see the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
superleap-0.1.3.tar.gz
(4.8 kB
view details)
Built Distribution
File details
Details for the file superleap-0.1.3.tar.gz
.
File metadata
- Download URL: superleap-0.1.3.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
73f27cf34d95ee60a116ac34231d60b43d615be72d13aa3804634ebba35f0d91
|
|
MD5 |
5d5bcb3260a6660ae16ece15b0c84ffb
|
|
BLAKE2b-256 |
09c3dd2a4214d4d7ca3dce2462d604414b1d72703fb34473b6a30d8a5a3d1bad
|
File details
Details for the file superleap-0.1.3-py3-none-any.whl
.
File metadata
- Download URL: superleap-0.1.3-py3-none-any.whl
- Upload date:
- Size: 6.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
d41e52898f25557e74767f66f1461e63bf52a09da4588b9599007311e1d6fa4d
|
|
MD5 |
80e11dbbe935df68c073678cfe142412
|
|
BLAKE2b-256 |
bcfb8cf8d10688e977daa01d57c62de9c8342dc82e74edda18a2c64603c9b433
|