Skip to main content

Zeblok Python SDK

Project description

Zeblok Python SDK

Zeblok-sdk will help integrate your MLOps workflows with the Zeblok Ai-MicroCloud platform.

Components of the Python SDK

Auth

  • API Authentication
  • DataLake Authentication

Resources

  • Plan
  • Namespace

Managed Service

  • Microservice
  • Orchestration-Addons
  • Ai-API
  • Ai-Pipeline
  • DataLake
  • DataSet
  • Inference Hub
  • Inference Chat

Interface

Authentication

  • API Authentication: APIAuth(app_url, api_access_key,api_access_secret)
  • DataLake Authentication: DataLake(api_auth, access_key, secret_key, bucket_name, blob_url, port)

Plans

  • Get all plans: get_all()
  • Get a plan by id: get_by_id(plan_id)
  • Validate a plan by id: validate_id(plan_id)
  • Get filtered details of a plan: get_filtered_details(plan_id, fields_req)

Namespaces

  • Get all namespaces: get_all()
  • Get a namespace by id: get_by_id(namespace_id)
  • Validate a namespace by id: validate_id(namespace_id)

MicroServices

  • Get all microservices: get_all()
  • Get a microservice by id: get_by_id(microservice_id)
  • Validate a microservice by id: validate_id(microservice_id)
  • Spawn a microservice: spawn(display_name, microservice_id, plan_id, microservice_name, namespace_id, envs, ports, args, command)

Orchestration-Addons

  • Get all orchestrations: get_all()
  • Get an orchestration by id: get_by_id(orchestration_id)
  • Validate an orchestration by id: validate_id(orchestration_id)
  • Spawn an orchestration: spawn(orchestration_id, plan_id, namespace_id, orchestration_name, min_workers, max_workers)

AI-APIs

  • Get all AI-APIs with deployed state: get_all(state=deployed)
  • Get all AI-APIs with ready state: get_all(state=ready)
  • Validate an AI-API: validate(image_name, state)
  • Create and Spawn an AI-API: create_and_spawn(ai_api_name, model_folder_path, plan_id, namespace_id, ai_api_type)
  • Create an AI-API: create(ai_api_name, model_folder_path, ai_api_type)
  • Spawn an AI-API: spawn(image_name, namespace_id, plan_id)

AI-Pipelines

  • Get all AI-Pipelines with created state: get_all(state=created)
  • Get all AI-Pipelines with ready state: get_all(state=ready)
  • Validate an AI-Pipeline: validate(image_name, state)
  • Create and Spawn an AI-API: create_and_spawn(ai_pipeline_name, ai_pipeline_folder_path, caas_plan_id, ai_pipeline_plan_id, namespace_id)
  • Create an AI-Pipeline: create(ai_pipeline_name, ai_pipeline_folder_path, caas_plan_id, ai_pipeline_plan_id, namespace_id)
  • Spawn an AI-Pipeline: spawn(ai_pipeline_plan_id, namespace_id, ai_pipeline_image_name)

DataLake

  • Check if a bucket exists: bucket_exists()
  • Check if an object exists: object_exists(object_name)
  • Upload an object: upload_object(local_file_pathname, object_name)
  • Download an object: download_object(object_name, local_dir, filename)
  • Get object PreSigned URL: get_presigned_url(object_name)
  • Upload a folder: upload_folder(folder_path)

DataSet

  • Get all DataSets: get_all()
  • Get Dataset information by name: get_by_name(dataset_name)
  • Create a DataSet: create_dataset(dataset_name, dataset_description)
  • Upload files in a DataSet: upload_dataset(dataset_id, filepaths)

Inference Hub

  • Get all inferences: get_all()
  • Get an inference by id: get_by_id(inference_id)
  • Validate an inference by id: validate_id(inference_id)
  • Spawn an inference: spawn(inference_name, inference_id, plan_id, namespace_id, inference_display_name, inference_model_image_name, inference_model_tag_id, resource_threshold, envs, ports, args, command, model_type, num_replicas, min_num_replicas, max_num_replicas, volume_path)
  • Get all spawned inferences: get_all_spawned_inferences()
  • Get a spawned inference by id: get_spawned_inference_by_id(spawned_inference_id)
  • Validate a spawned inference by id: validate_spawned_inference_id(spawned_inference_id)
  • Get spawned inference ID by spawned inference pod name: get_spawned_inference_id_by_pod_name(spawned_inference_pod_name)

Inference Chat

  • Chat with a spawned inference: chat(prompt)
  • Get chats history for the current active chat session: get_all()

Usage

Checkout the detailed usage of the SDK at Usage.md

Contact Zeblok

Team Email
Technical Team support@zeblok.com
Sales Team sales@zeblok.com

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zeblok_sdk-1.4.0.tar.gz (34.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

zeblok_sdk-1.4.0-py3-none-any.whl (40.1 kB view details)

Uploaded Python 3

File details

Details for the file zeblok_sdk-1.4.0.tar.gz.

File metadata

  • Download URL: zeblok_sdk-1.4.0.tar.gz
  • Upload date:
  • Size: 34.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.4

File hashes

Hashes for zeblok_sdk-1.4.0.tar.gz
Algorithm Hash digest
SHA256 8613321a81265a093517d343c5f2ed3567f3059bb9b11fe2e40872fe3196c24b
MD5 6e3d331820f4594a0b21faed2a2a20f5
BLAKE2b-256 dc678dca1215d601ee6d0379c758f01dfa64fc8487dd2fc500dd7ab662090550

See more details on using hashes here.

File details

Details for the file zeblok_sdk-1.4.0-py3-none-any.whl.

File metadata

  • Download URL: zeblok_sdk-1.4.0-py3-none-any.whl
  • Upload date:
  • Size: 40.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.4

File hashes

Hashes for zeblok_sdk-1.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bb19d923fd08ad949d88486cb31b6a081469c634b5db1c8c096a4ad908d20d41
MD5 d320432ccc6b4be8a7f8d00694b2ad3f
BLAKE2b-256 f3ea956bf72935f023a906f28535e5786c77f54b5385fd6484e104887adcb102

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page