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.3.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.3.0-py3-none-any.whl (19.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: casibase_python_sdk-1.3.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.3.0.tar.gz
Algorithm Hash digest
SHA256 24265a5e8826a080d1b4e2ceb78fd767d127d58ac817721667521a73392f4915
MD5 2bbcd69c1d16971b99fc16adf3c402a2
BLAKE2b-256 8a577a95048b26adeec5c472539982812a279d90c0a917f6b1f17d3c1dba96d9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for casibase_python_sdk-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d4f34642d99938f7f887d2e222631bb051843af80f46343a687b1068c5a3af1b
MD5 f2132f91a897970220d960858f6a4d3d
BLAKE2b-256 f1cf447124c4ab79e0fb959d72abb6fdaa2423d543c81d8da37f26122210c8d7

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