Skip to main content

Official Python SDK for Alecto Core

Project description

alectocore-sdk

Official Python SDK for Alecto Core.

Requirements

  • Python 3.9+
  • Alecto Core key

Install

pip install alectocore-sdk

Quickstart

from alectocore_sdk import AlectoCoreClient

client = AlectoCoreClient(api_key="ak_live_xxx")
out = client.moderate({"text": "you are an idiot"})
print(out["request_id"], out["action"], out["score"])

Supported methods

  • moderate(body)
  • moderate_handle(body)
  • moderate_batch(body)
  • moderate_structured(body)
  • categories()
  • feedback(body)
  • queue(limit=100)
  • resolve_queue_item(request_id, body)

Errors

API errors raise AlectoCoreError with:

  • status HTTP status
  • data parsed error response (if available)

Base URL override

client = AlectoCoreClient(
    api_key="ak_live_xxx",
    base_url="http://localhost:8080"
)

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

alectocore_sdk-0.1.1.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

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

alectocore_sdk-0.1.1-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file alectocore_sdk-0.1.1.tar.gz.

File metadata

  • Download URL: alectocore_sdk-0.1.1.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for alectocore_sdk-0.1.1.tar.gz
Algorithm Hash digest
SHA256 7617efab5aedc3e39657a7c8448ef1fed928c09902b87d7bd87ebc3ac4f96897
MD5 e9b6b47db1098a812744218ae52780ac
BLAKE2b-256 b36f7dc3765a453d7150df0b8c0ec5005bd4b8e6889101019ed370b7039cb43f

See more details on using hashes here.

Provenance

The following attestation bundles were made for alectocore_sdk-0.1.1.tar.gz:

Publisher: publish.yml on StrathWorks/AlectoCore-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file alectocore_sdk-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: alectocore_sdk-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 3.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for alectocore_sdk-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fdee01c5af6451a19067c53c54dba5291d7ce2df8703788b714252deb6e0b1f2
MD5 2a4c34335bb05d199a68e1802c5f6ece
BLAKE2b-256 1538c58dff08efb0e18b75166914d5ace4fd5013e1aab45fbcd393827ef4c673

See more details on using hashes here.

Provenance

The following attestation bundles were made for alectocore_sdk-0.1.1-py3-none-any.whl:

Publisher: publish.yml on StrathWorks/AlectoCore-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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