Chino.io Scriba SDK Python
Project description
Chino.io :: Scriba Documentation: the Application Programming Interface
This Python package is automatically generated by the Swagger Codegen project:
- API version: v1
- Package version: 1.0.0
- Build package: io.swagger.codegen.v3.generators.python.PythonClientCodegen
Requirements.
Python 2.7 and 3.4+
Installation & Usage
Install the generated package (see on top here or):
pip install chinoscriba
Getting Started
import chinoscriba
from chinoscriba.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: Basic
configuration = chinoscriba.Configuration()
configuration.username = 'customer_id'
configuration.password = 'customer_key'
# create an instance of the API classes
logs_api = chinoscriba.LogsApi(chinoscriba.ApiClient(configuration))
stats_api = chinoscriba.StatsApi(chinoscriba.ApiClient(configuration))
blocks_api = chinoscriba.BlocksApi(chinoscriba.ApiClient(configuration))
limit = 56 # int | Number of results to return per page
offset = 0 # int | The initial index from which to return the results
# # Audit logs # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# Create a new Log
body = chinoscriba.AuditLog() # AuditLog |
try:
api_response = logs_api.logs_create(body)
pprint(api_response)
except ApiException as e:
print("Exception when calling DefaultApi->logs_create: %s\n" % e)
# Create multiple Logs (bulk)
body = [chinoscriba.AuditLog()] # list[AuditLog] |
try:
api_response = logs_api.logs_multiple(body)
pprint(api_response)
except ApiException as e:
print("Exception when calling DefaultApi->logs_multiple: %s\n" % e)
try:
# List all Logs
api_response = logs_api.logs_list(limit=limit, offset=offset)
pprint(api_response)
except ApiException as e:
print("Exception when calling DefaultApi->logs_list: %s\n" % e)
try:
# Search by query
api_response = logs_api.logs_search(body, limit=limit, offset=offset)
pprint(api_response)
except ApiException as e:
print("Exception when calling DefaultApi->logs_search: %s\n" % e)
# # Stats # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
try:
# Retrieve customer statistics
api_response = stats_api.stats_read()
pprint(api_response)
except ApiException as e:
print("Exception when calling DefaultApi->stats_read: %s\n" % e)
# # Exporter # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
try:
# List exportable Blocks
api_response = blocks_api.exported_list(limit=limit, offset=offset)
pprint(api_response)
except ApiException as e:
print("Exception when calling DefaultApi->exported_list: %s\n" % e)
# Export a Block
block_id = "" # string | ID of the Block to download
try:
# NOTE: due to an issue in a third-party library, this only works with
# '_preload_content' disabled. This will bypass the malfunctioning code
# and return directly the HTTPResponse, which contains the zip file bytes
# in the 'data' attribute.
res = blocks_api.exported_read(block_id, _preload_content=False)
zip_bytes = res.data # You can read this using python library 'zipfile'.
except ApiException as e:
print("Exception when calling BlocksApi->exported_read: %s\n" % e)
Changelog
[2.2.0] - 2025-04-10
- added support for new field
deleted_atonBlockmodel
[2.1.1] - 2023-11-29
- added support for new endpoint: "Validate downloaded Block" (/validate/)
- fixed events' tests
[2.0.0] - 2021-01-22
- CHANGELOG.md (this file)
- added support for new events endpoints
- removed unique class
DefaultApiin favour of specific classes based on endpoint semantic groups:LogApi,BlockApi,EventsApi,StatsApi
[1.0.1] - 2021-01-15
DefaultApiclass which manages logs (create, list, search) and block downloads
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
chinoscriba-2.2.0.tar.gz
(33.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file chinoscriba-2.2.0.tar.gz.
File metadata
- Download URL: chinoscriba-2.2.0.tar.gz
- Upload date:
- Size: 33.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.22
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c32998666b8e421138a86d8b52a8951d4e150fa1763358eeb7ef8d5158eab520
|
|
| MD5 |
b844c9cede1f5d867c5b927aa3a02532
|
|
| BLAKE2b-256 |
52da660927d4ba2240f5bc044608bc0cc141caa9068384a00caba827cf8ef623
|
File details
Details for the file chinoscriba-2.2.0-py3-none-any.whl.
File metadata
- Download URL: chinoscriba-2.2.0-py3-none-any.whl
- Upload date:
- Size: 55.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.22
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4395422880644647a2d2995e4e9139783d97dea8a5e5053cb4da04f9d58fb378
|
|
| MD5 |
f5cad66ad2294e6c87eaf04e7cef81ea
|
|
| BLAKE2b-256 |
50820367aec9a6bd2231674a0d423e9886433ec10f1da5cfb7715ba00f4f4a3a
|