casibase-python-sdk
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)
Metadata
Release files for casibase-python-sdk 1.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| casibase_python_sdk-1.3.0.tar.gz | 11.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| casibase_python_sdk-1.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 31.4 kB
Release files / casibase_python_sdk-1.3.0.tar.gz
| Download URL | casibase_python_sdk-1.3.0.tar.gz |
|---|---|
| Size | 11.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
24265a5e8826a080d1b4e2ceb78fd767d127d58ac817721667521a73392f4915
|
|
BLAKE2b-256 checksum How to use checksums |
8a577a95048b26adeec5c472539982812a279d90c0a917f6b1f17d3c1dba96d9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.11
|
Release files / casibase_python_sdk-1.3.0-py3-none-any.whl
| Download URL | casibase_python_sdk-1.3.0-py3-none-any.whl |
|---|---|
| Size | 19.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d4f34642d99938f7f887d2e222631bb051843af80f46343a687b1068c5a3af1b
|
|
BLAKE2b-256 checksum How to use checksums |
f1cf447124c4ab79e0fb959d72abb6fdaa2423d543c81d8da37f26122210c8d7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.11
|