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.0.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.0-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: alectocore_sdk-0.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 d67bad902d5e453aa5fb8c410a1b6e881d8e3536fd42206ea3614592c35eb6d9
MD5 ef4d754010211efbb68b63543702aa36
BLAKE2b-256 fedb73890bac1d3a21b83c0e6120ac479594d30d103949a5d99e629b7bbeacd5

See more details on using hashes here.

Provenance

The following attestation bundles were made for alectocore_sdk-0.1.0.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.0-py3-none-any.whl.

File metadata

  • Download URL: alectocore_sdk-0.1.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8a5f931191254e77a7679b079f4ad69accf9ec7b7c83029a74d5449f03e40c7a
MD5 4965cfb890160b90af16310549eec04c
BLAKE2b-256 e76b1571257f9a1a2a4394d6a4d8a6a5c71b3ade881175d476c0f15259aee968

See more details on using hashes here.

Provenance

The following attestation bundles were made for alectocore_sdk-0.1.0-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