https://github.com/casvisor/casvisor-python-sdk
Python client SDK for Casvisor
https://github.com/casvisor/casvisor-python-sdk
api casvisor client py python sdk
Last synced: 4 months ago
JSON representation
Python client SDK for Casvisor
- Host: GitHub
- URL: https://github.com/casvisor/casvisor-python-sdk
- Owner: casvisor
- License: apache-2.0
- Created: 2025-01-03T13:45:04.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-01-27T05:32:45.000Z (over 1 year ago)
- Last Synced: 2026-01-04T15:50:24.374Z (5 months ago)
- Topics: api, casvisor, client, py, python, sdk
- Language: Python
- Homepage: https://github.com/casvisor/casvisor
- Size: 31.3 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# casvisor-python-sdk
[](https://github.com/casvisor/casvisor-python-sdk/actions)
[](https://pypi.org/project/casvisor-python-sdk/)
[](https://pypi.org/project/casvisor-python-sdk/)
[](https://pypi.org/project/casvisor-python-sdk/)
[](https://discord.gg/5rPsrAzK7S)
Casvisor Python SDK is the official Python client for [Casvisor](https://github.com/casvisor/casvisor), used to interact with Casvisor services.
Casvisor-python-sdk is available on PyPI:
```console
pip install casvisor-python-sdk
```
Casvisor SDK is simple to use. We will show you the steps below.
## Init Config
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 |
```python
from casvisor-python-sdk import CasvisorSDK
sdk = CasvisorSDK(
endpoint,
clientId,
clientSecret,
organizationName,
applicationName,
)
```
## Basic Usage
casvisor-python-sdk supports some basic operations, such as:
- `get_records(self)`, get all records
- `get_record(self, name: str)`, get one record by name
- `get_pagination_records(self, p: int, pageSize: int, query_map: Dict[str, str])`, get records by pagination
- `update_record(self, record: Record)`, update one record
- `add_record(self, record: Record)`, add one record
- `delete_record(self, record: Record)`, delete one record
## Test
Run test:
```console
pip install -r requirements.txt
python -m unittest discover src/tests -v
```
## Contribution
We welcome any form of contribution, including but not limited to:
1. Submit issues and suggestions
2. Submit Pull Request
3. Improve documentation
## License
This project is licensed under the [Apache 2.0 License](LICENSE).