aito.client.AitoClient¶
-
class
aito.client.
AitoClient
(instance_url: str, api_key: str, check_credentials: bool = True)¶ A versatile client that connects to the Aito Database Instance
- Parameters
instance_url (str) – Aito instance url
api_key (str) – Aito instance API key
check_credentials (bool) – check the given credentials by requesting the Aito instance version, defaults to True
- Raises
BaseError – an error occurred during the creation of AitoClient
Methods
async_requests
(methods, endpoints, queries)async multiple requests
check_table_exists
(table_name)check if a table exists in the instance
copy_table
(table_name, copy_table_name[, …])create_database
(database_schema)create a database using the specified database schema
create_job
(job_endpoint, query)Create a job for a query that takes longer than 30 seconds to run
create_table
(table_name, table_schema)create a table with the specified table name and schema
delete_table
(table_name)download_table
(table_name, output_folder[, …])download a table to a NDJSON file or a gzipped NDJSON file
get a list of existing tables in the instance
get_job_result
(job_id)Get the result of a job with the specified job id
get_job_status
(job_id)Get the status of a job with the specified job id
get_table_schema
(table_name)get_table_size
(table_name)return the number of entries of the specified table
get the aito instance version
job_request
(job_endpoint[, query, polling_time])make a request to an Aito API endpoint using job
naive_predict
(predicting_field, from_table)generate an example predict query to predict a field
optimize_table
(table_name)query_all_entries
(table_name[, select, …])query all entries of the specified table
query_entries
(table_name[, offset, limit, …])query entries of the specified table
rename_table
(old_name, new_name[, replace])request
(method, endpoint[, query])make a request to an Aito API endpoint
upload_binary_file
(table_name, binary_file)upload_entries
(table_name, entries[, …])populate table entries by batches of batch_size
upload_entries_by_batches
(table_name, entries)Deprecated since version 0.2.1.
upload_file
(table_name, file_path[, …])upload a file to the specfied table