Provides access to the Waii APIs
Project description
Waii Python SDK Documentation
The waii-sdk-py is a Python library that allows you to interact with the Waii API. It provides a powerful SQL and AI capability to your Python applications.
Installation
To install the waii-sdk-py, you can use pip:
pip install waii-sdk-py
Importing the SDK
from waii_sdk_py import WAII
Initializing the SDK
Before using any of the functionality of the SDK, you must initialize it:
WAII.initialize("<your-api-url>", "<your-api-key>")
Modules
The SDK consists of the following modules:
DatabaseQuerySemanticContextHistory
Each module encapsulates a certain functionality of the Waii API.
Database
The Database module contains methods for handling database-related tasks.
Here are some of its methods:
Modify Connections
Database.modify_connections(params: ModifyDBConnectionRequest) -> ModifyDBConnectionResponse
This method allows to modify the database connections.
Get Connections
Database.get_connections(params: GetDBConnectionRequest = GetDBConnectionRequest()) -> GetDBConnectionResponse
This method fetches the list of available database connections.
Activate Connection
Database.activate_connection(key: str)
This method sets the scope of the current database connection.
Get Default Connection
Database.get_default_connection()
This method gets the scope of the current database connection.
Get Catalogs
Database.get_catalogs(params: GetCatalogRequest = GetCatalogRequest()) -> GetCatalogResponse
This method retrieves the list of available catalogs.
Update Table and Schema Descriptions
Database.update_table_description(params: UpdateTableDescriptionRequest) -> UpdateTableDescriptionResponse
Database.update_schema_description(params: UpdateSchemaDescriptionRequest) -> UpdateSchemaDescriptionResponse
These methods update the corresponding descriptions of the objects within the database
Query
The Query module contains methods related to SQL query handling.
Here are some of its methods:
Generate
Query.generate(params: QueryGenerationRequest) -> GeneratedQuery
This method generates a SQL query based on the provided parameters.
Run
Query.run(params: RunQueryRequest) -> GetQueryResultResponse
This method runs a SQL query and fetches the results.
Like
Query.like(params: LikeQueryRequest) -> LikeQueryResponse
This method marks a query as "liked".
Submit
Query.submit(params: RunQueryRequest) -> RunQueryResponse
This method submits a SQL query.
Get Results
Query.get_results(params: GetQueryResultRequest) -> GetQueryResultResponse
This method fetches the result of a previously submitted query.
Cancel
Query.cancel(params: CancelQueryRequest) -> CancelQueryResponse
This method cancels a previously submitted query.
Describe
Query.describe(params: DescribeQueryRequest) -> DescribeQueryResponse
This method fetches a description of a SQL query.
Diff
Query.diff(params: DiffQueryRequest) -> DiffQueryResponse
This method generates a description of the difference between two SQL queries
Auto Complete
Query.auto_complete(params: AutoCompleteRequest) -> AutoCompleteResponse
This method allows you to automatically complete a partial query
Analyze Performance
Query.analyze_performance(params: QueryPerformanceRequest) -> QueryPerformanceResponse
This method provides a summary of the runtime of a query as well as recommendations on how to make the query run faster
Semantic Context
The SemanticContext module contains methods related to semantic context handling.
Here are some of its methods:
Modify Semantic Context
SemanticContext.modify_semantic_context(params: ModifySemanticContextRequest) -> ModifySemanticContextResponse
This method allows you to modify the semantic context.
Get Semantic Context
SemanticContext.get_semantic_context(params: GetSemanticContextRequest = GetSemanticContextRequest()) -> GetSemanticContextResponse
This method fetches the current semantic context.
History
The History module contains methods related to history handling.
Here are some of its methods:
List
History.list(params: GetGeneratedQueryHistoryRequest = GetGeneratedQueryHistoryRequest()) -> GetGeneratedQueryHistoryResponse
This method fetches the history of generated queries.
For detailed information about the request and response objects and the available properties, refer to the respective Python files of each module.
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
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 waii-sdk-py-1.7.1.tar.gz.
File metadata
- Download URL: waii-sdk-py-1.7.1.tar.gz
- Upload date:
- Size: 13.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
83cc73c97657aca32f15de8948faecd1d6d46d92130e130d347182524ff5ac3d
|
|
| MD5 |
9f89b727d5d6355f587b7e72d113d35d
|
|
| BLAKE2b-256 |
5c33edef72e1fbba0420b750ebcdde5e8b71ada002aae25110e169bc4368995f
|
File details
Details for the file waii_sdk_py-1.7.1-py3-none-any.whl.
File metadata
- Download URL: waii_sdk_py-1.7.1-py3-none-any.whl
- Upload date:
- Size: 17.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a33d1cd2470b04c498a652e90685565493a338c627c2589fb6873def53a74b8c
|
|
| MD5 |
f5871e75e43377049e0ec582e99c5593
|
|
| BLAKE2b-256 |
da74e2090d57a0cbb7bcbba04e7fb0e26c7135f96d30d82b86b3ddead8a63824
|