upload_instructions
imerit_ango.sdk.SDK.
upload_instructions(project_id, file_path, storage_id, bucket)
Upload the instruction file to the project.
Parameters
project_id: string
The unique identifier for the project. You can find the project ID in the user interface or retrieve it using the
list_projects
function.
file_path: string
Absolute path to the instruction file.
storage_id: string, Optional, default None
The unique identifier for the storage. You can retrieve the storage ID using
get_storages
function.
bucket: string, Optional, default None
The name of the S3 bucket to use for upload.
Returns:
output: dict
A dictionary containing the result of the operation.
Example
Upload an instruction file:
import os
from dotenv import load_dotenv
from imerit_ango.sdk import SDK
load_dotenv('variables.env')
api_key = os.getenv('API_KEY')
project_id = os.getenv('PROJECT_ID')
ango_sdk = SDK(api_key)
file_path = "/Users/user/Desktop/project_instruction.pdf"
sdk_response = sdk.upload_instructions(project_id=project_id, file_path=file_path)
Upload an instruction file to the custom storage bucket
import os
from dotenv import load_dotenv
from imerit_ango.sdk import SDK
load_dotenv('variables.env')
api_key = os.getenv('API_KEY')
project_id = os.getenv('PROJECT_ID')
ango_sdk = SDK(api_key)
file_path = "/Users/user/Desktop/project_instruction.pdf"
storage_id = "<Storage ID>"
bucket_name = "<Custom Bucket Name>"
sdk_response = sdk.upload_instructions(project_id=project_id,
file_path=file_path,
storage_id=storage_id,
bucket=bucket_name)
Last updated