Skip to main content

Python SDK built for Casibase

Project description

casibase-python-sdk

build Status Coverage Status Version PyPI - Wheel Pyversions Download License Discord This is the Python SDK for Casibase, which allows you to easily call Casibase's API.

casibase-python-sdk is available on PyPI:

pip install casibase-python-sdk

Casibase SDK is simple to use. We will show you the steps below.

Step1. Init Config

Initialization requires 5 parameters, which are all str type:

Name (in order) Must Description
endpoint Yes Casdoor Server Url, such as https://demo-admin.casibase.com
client_id Yes Application.client_id
client_secret Yes Application.client_secret
org_name Yes Organization name
application_name Yes Application name
from casibase_python_sdk import CasibaseSDK

sdk = CasibaseSDK(
    endpoint,
    client_id,
    client_secret,
    organization_name,
    application_name,
)

Step2. Record Operations

Used for logging operations, blockchain events, etc.

  • Create: record = Record.new(...); sdk.add_record(record)
  • Query: record_obj = sdk.get_record("name")
  • Update: record_obj.attr = "new_val"; sdk.update_record(record_obj)
  • Delete: sdk.delete_record(record_obj)

Step3. Store Operations

Used for managing knowledge bases, model configurations, etc.

  • Create: store = Store.new(...); sdk.add_store(store)
  • Query: store_obj = sdk.get_store(owner="admin", name="name")
  • Update: store_obj.attr = "new_val"; sdk.update_store(store_obj)
  • Delete: sdk.delete_store(store_obj)

Step4. Task Operations

Used for managing tasks, jobs, etc.

  • Create: task = Task.new(...); sdk.add_task(task)
  • Query: task_obj = sdk.get_task(owner="admin", name="name")
  • Update: task_obj.attr = "new_val"; sdk.update_task(task_obj)
  • Delete: sdk.delete_task(task_obj)

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

casibase_python_sdk-1.2.0.tar.gz (11.5 kB view details)

Uploaded Source

Built Distribution

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

casibase_python_sdk-1.2.0-py3-none-any.whl (19.9 kB view details)

Uploaded Python 3

File details

Details for the file casibase_python_sdk-1.2.0.tar.gz.

File metadata

  • Download URL: casibase_python_sdk-1.2.0.tar.gz
  • Upload date:
  • Size: 11.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.11

File hashes

Hashes for casibase_python_sdk-1.2.0.tar.gz
Algorithm Hash digest
SHA256 9191643720a520fd5d9a0d630a0f47e5018ff7001eabdf1a580bbb22503bc0e7
MD5 5a6accc09a632618efd73f419094db4e
BLAKE2b-256 7c2a60cdcbf3407122f81ef9a41f5b780fbbce3732964e817b97269498214298

See more details on using hashes here.

File details

Details for the file casibase_python_sdk-1.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for casibase_python_sdk-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f89a15fc65158d82d24245f0be7c3d94e2919e8d3a8f5fdedb7ca35816c66eb7
MD5 a88b35b8ee34e99eb51a18e223b25b77
BLAKE2b-256 ca1108b9e4e66bde3b91ad1ea54342f15aed4ac3ace5887173b99b3eb7a91506

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