For use with the Kexxu Cloud at https://editor.kexxu.com.
Install with (python>=3.7):
pip install git+https://github.com/kexxu-robotics/KexxuEditor-Python-SDK.git
kexxu-robotics.github.io/KexxuEditor-Python-SDK/
In examples folder
On https://editor.kexxu.com create a project, open the project, select create api key, type upload.
Use the project id from the end of the url, something like https://editor.kexxu.com/#/project/12345 where 12345 is the project id.
Then using Python:
from kexxu_editor_sdk.api.upload_image import upload_image
import requests
# Core Configuration
API_KEY = "your_actual_api_key_here"
PROJECT_ID = 12345
IMAGE_PATH = "captures/frame_0102.jpg"
try:
print("Initiating standard upload...")
response = upload_image(
file_path=IMAGE_PATH,
api_key=API_KEY,
ai_object_id=PROJECT_ID,
name="doorway_detection_01.jpg",
image_group_name="main_entrance",
)
if response.status_code == 200:
print("Upload successful!")
print(f"Server Response: {response.text}")
except requests.exceptions.HTTPError as http_err:
print(f"HTTP Error occurred: {http_err} - {http_err.response.text}")
except Exception as err:
print(f"An unexpected error occurred: {err}")