Casvisor Python SDK is the official Python client for Casvisor, used to interact with Casvisor services.
Casvisor-python-sdk is available on PyPI:
pip install casvisor-python-sdkCasvisor SDK is simple to use. We will show you the steps below.
Initialization requires 5 parameters, which are all str type:
| Name (in order) | Must | Description |
|---|---|---|
| endpoint | Yes | Casvisor Server Url, such as http://localhost:16001 |
| clientId | Yes | Application.clientId |
| clientSecret | Yes | Application.clientSecret |
| organizationName | Yes | Organization name |
| applicationName | Yes | Application name |
from casvisor-python-sdk import CasvisorSDK
sdk = CasvisorSDK(
endpoint,
clientId,
clientSecret,
organizationName,
applicationName,
)casvisor-python-sdk supports some basic operations, such as:
get_records(self), get all recordsget_record(self, name: str), get one record by nameget_pagination_records(self, p: int, pageSize: int, query_map: Dict[str, str]), get records by paginationupdate_record(self, record: Record), update one recordadd_record(self, record: Record), add one recorddelete_record(self, record: Record), delete one record
Run test:
pip install -r requirements.txt
python -m unittest discover src/tests -vWe welcome any form of contribution, including but not limited to:
- Submit issues and suggestions
- Submit Pull Request
- Improve documentation
This project is licensed under the Apache 2.0 License.