Name | chinoscriba JSON |
Version |
2.1.1
JSON |
| download |
home_page | https://www.chino.io |
Summary | Chino.io Scriba SDK Python |
upload_time | 2023-11-29 08:28:55 |
maintainer | |
docs_url | None |
author | |
requires_python | |
license | |
keywords |
chino.io
scriba
api
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
Chino.io :: Scriba Documentation: the Application Programming Interface
This Python package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/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
```python
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.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 `DefaultApi` in favour of specific classes based on
endpoint semantic groups: `LogApi`, `BlockApi`, `EventsApi`, `StatsApi`
### [1.0.1] - 2021-01-15
- `DefaultApi` class which manages logs (create, list, search) and block
downloads
Raw data
{
"_id": null,
"home_page": "https://www.chino.io",
"name": "chinoscriba",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "Chino.io Scriba API",
"author": "",
"author_email": "",
"download_url": "https://files.pythonhosted.org/packages/7b/47/01db316d811b51b405f2923a2c0e3b0a3684ed65ab15abd2332b3517ca0d/chinoscriba-2.1.1.tar.gz",
"platform": null,
"description": "Chino.io :: Scriba Documentation: the Application Programming Interface\n\nThis Python package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:\n\n- API version: v1\n- Package version: 1.0.0\n- Build package: io.swagger.codegen.v3.generators.python.PythonClientCodegen\n\n## Requirements.\n\nPython 2.7 and 3.4+\n\n## Installation & Usage\n\nInstall the generated package (see on top here or):\n\n pip install chinoscriba\n\n## Getting Started\n\n```python\nimport chinoscriba\nfrom chinoscriba.rest import ApiException\nfrom pprint import pprint\n\n# Configure HTTP basic authorization: Basic\nconfiguration = chinoscriba.Configuration()\nconfiguration.username = 'customer_id'\nconfiguration.password = 'customer_key'\n\n# create an instance of the API classes\nlogs_api = chinoscriba.LogsApi(chinoscriba.ApiClient(configuration))\nstats_api = chinoscriba.StatsApi(chinoscriba.ApiClient(configuration))\nblocks_api = chinoscriba.BlocksApi(chinoscriba.ApiClient(configuration))\n\nlimit = 56 # int | Number of results to return per page\noffset = 0 # int | The initial index from which to return the results\n\n\n# # Audit logs # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # \n\n# Create a new Log\nbody = chinoscriba.AuditLog() # AuditLog | \ntry:\n api_response = logs_api.logs_create(body)\n pprint(api_response)\nexcept ApiException as e:\n print(\"Exception when calling DefaultApi->logs_create: %s\\n\" % e)\n\n\n# Create multiple Logs (bulk)\nbody = [chinoscriba.AuditLog()] # list[AuditLog] | \ntry:\n api_response = logs_api.logs_multiple(body)\n pprint(api_response)\nexcept ApiException as e:\n print(\"Exception when calling DefaultApi->logs_multiple: %s\\n\" % e)\n\ntry:\n # List all Logs\n api_response = logs_api.logs_list(limit=limit, offset=offset)\n pprint(api_response)\nexcept ApiException as e:\n print(\"Exception when calling DefaultApi->logs_list: %s\\n\" % e)\n\ntry:\n # Search by query\n api_response = logs_api.logs_search(body, limit=limit, offset=offset)\n pprint(api_response)\nexcept ApiException as e:\n print(\"Exception when calling DefaultApi->logs_search: %s\\n\" % e)\n\n# # Stats # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # \n\ntry:\n # Retrieve customer statistics\n api_response = stats_api.stats_read()\n pprint(api_response)\nexcept ApiException as e:\n print(\"Exception when calling DefaultApi->stats_read: %s\\n\" % e)\n\n\n# # Exporter # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # \n\ntry:\n # List exportable Blocks\n api_response = blocks_api.exported_list(limit=limit, offset=offset)\n pprint(api_response)\nexcept ApiException as e:\n print(\"Exception when calling DefaultApi->exported_list: %s\\n\" % e)\n\n\n# Export a Block\nblock_id = \"\" # string | ID of the Block to download\ntry:\n # NOTE: due to an issue in a third-party library, this only works with \n # '_preload_content' disabled. This will bypass the malfunctioning code\n # and return directly the HTTPResponse, which contains the zip file bytes\n # in the 'data' attribute.\n res = blocks_api.exported_read(block_id, _preload_content=False)\n zip_bytes = res.data # You can read this using python library 'zipfile'.\nexcept ApiException as e:\n print(\"Exception when calling BlocksApi->exported_read: %s\\n\" % e)\n\n```\n\n## Changelog\n\n### [2.1.1] - 2023-11-29\n- added support for new endpoint: \"Validate downloaded Block\" (/validate/)\n- fixed events' tests\n\n### [2.0.0] - 2021-01-22\n- CHANGELOG.md (this file)\n- added support for new events endpoints\n- removed unique class `DefaultApi` in favour of specific classes based on\n endpoint semantic groups: `LogApi`, `BlockApi`, `EventsApi`, `StatsApi`\n\n### [1.0.1] - 2021-01-15\n- `DefaultApi` class which manages logs (create, list, search) and block\n downloads\n\n\n",
"bugtrack_url": null,
"license": "",
"summary": "Chino.io Scriba SDK Python",
"version": "2.1.1",
"project_urls": {
"Homepage": "https://www.chino.io"
},
"split_keywords": [
"chino.io",
"scriba",
"api"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "41b9c07ba9e4f76e5cf599bcfddeb0d040a55506a125cdb7f87644f6cf6ccaa7",
"md5": "c69fa970fccf5f4034d59f9e4792523a",
"sha256": "f6c0c490a816c29fc5001b861aa9f4bc14b5e1182ed2fa03e597aabe4b2e6174"
},
"downloads": -1,
"filename": "chinoscriba-2.1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "c69fa970fccf5f4034d59f9e4792523a",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 55466,
"upload_time": "2023-11-29T08:28:54",
"upload_time_iso_8601": "2023-11-29T08:28:54.097235Z",
"url": "https://files.pythonhosted.org/packages/41/b9/c07ba9e4f76e5cf599bcfddeb0d040a55506a125cdb7f87644f6cf6ccaa7/chinoscriba-2.1.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "7b4701db316d811b51b405f2923a2c0e3b0a3684ed65ab15abd2332b3517ca0d",
"md5": "4b3eb11f85cc0b47b71ca09f1b4ff9ac",
"sha256": "4f1c36b59f4a6b9cdb2e31bb40519f9da2ab9c2f58ef32d81972f20a49c046ee"
},
"downloads": -1,
"filename": "chinoscriba-2.1.1.tar.gz",
"has_sig": false,
"md5_digest": "4b3eb11f85cc0b47b71ca09f1b4ff9ac",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 33693,
"upload_time": "2023-11-29T08:28:55",
"upload_time_iso_8601": "2023-11-29T08:28:55.446602Z",
"url": "https://files.pythonhosted.org/packages/7b/47/01db316d811b51b405f2923a2c0e3b0a3684ed65ab15abd2332b3517ca0d/chinoscriba-2.1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-11-29 08:28:55",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "chinoscriba"
}