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
Release files for chinoscriba 2.2.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 | |
|---|---|---|---|
| chinoscriba-2.2.0.tar.gz | 33.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| chinoscriba-2.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 89.3 kB
Release files / chinoscriba-2.2.0.tar.gz
| Download URL | chinoscriba-2.2.0.tar.gz |
|---|---|
| Size | 33.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c32998666b8e421138a86d8b52a8951d4e150fa1763358eeb7ef8d5158eab520
|
|
BLAKE2b-256 checksum How to use checksums |
52da660927d4ba2240f5bc044608bc0cc141caa9068384a00caba827cf8ef623
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.9.22
|
Release files / chinoscriba-2.2.0-py3-none-any.whl
| Download URL | chinoscriba-2.2.0-py3-none-any.whl |
|---|---|
| Size | 55.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4395422880644647a2d2995e4e9139783d97dea8a5e5053cb4da04f9d58fb378
|
|
BLAKE2b-256 checksum How to use checksums |
50820367aec9a6bd2231674a0d423e9886433ec10f1da5cfb7715ba00f4f4a3a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.9.22
|