peak-sdk
  • Usage
    • Managing Sessions with Peak-SDK
      • Sessions
        • Importing and defining a custom Session objects for use within clients
          • This custom Session object can be passed when creating new clients of any kind.
          • The main purpose of this is to allow for the use of custom Session objects when working across multiple tenants simultaneously.
          • Multi-Environment usage example with a Workflow client
          • The default behavior is to pick up arguments from the user’s environment.
    • Interacting with Peak resource services
      • Image resource
        • Import the image resource module and instantiate the client
        • List all existing image(s) and iterate over them
        • List all existing image version(s) and iterate over them
        • Create a new image resource
        • Create a new image version resource
        • Create or update a image version
        • Describe an existing image resource
        • Describe an existing version resource
        • Update an existing image version resource
        • List all builds in an existing image resource and iterate over them
        • Get logs for a specific build in an existing image resource
        • Delete an existing image version resource
        • Delete multiple existing image version resources
        • Delete an existing image resource
      • Workflows resource
        • Import the workflow resource module and instantiate a workflow-service client
        • List all existing workflow(s) and iterate over them
        • Prepare the payload and submit a new workflow resource for creation
        • Modify the payload and update the existing workflow resource
        • Modify the payload and update the existing workflow resource via patch-workflow
        • Create or update a workflow resource
        • Describe an existing workflow resource
        • Delete an existing workflow resource
        • List all executions of a workflow resource and iterate over them
        • Get Details about a workflow execution
        • Get logs for a specific execution of a workflow resource
        • Schedule an immediate execution for a workflow
        • Get all available resources for workflow
        • Get default resource values for workflow
      • Artifacts resource
        • Import the artifact resource module and instantiate an artifact-service client
        • Create a new artifact resource by uploading a file
        • List all existing artifact(s) and iterate over them
        • Describe an existing artifact
        • Update an artifact resource with a new version by uploading a new file
        • Update an artifact resource’s existing metadata
        • Download a versioned artifact from an existing artifact resource
        • Delete an artifact version from an existing artifact resource
        • Delete an artifact resource along with all its version(s)
      • Tenants resource
        • Import the tenant resource module and instantiate the tenant-service client
        • List all available instance-options(s)
      • Webapps resource
        • Import the webapps resource module and instantiate a webapps-service client
        • List all existing webapps(s) and iterate over them
        • Prepare the payload and submit a new Webapp resource for creation
        • Modify the payload and update the existing Webapp resource
        • Create or update a Webapp resource
        • Delete an existing Webapp resource
        • Describe an existing Webapp resource
    • Interacting with Press framework services
      • Press Apps
        • Import the press app module and Instantiate a press-app client
        • Prepare an app-spec payload and create an app-spec
        • List created app-spec(s) and iterate over them
        • Describe an already existing app-spec
        • Update an app-spec’s metadata
        • Create a new app-spec release with updated config and release
        • Describe the app-spec release
        • List all app-spec release(s) and iterate over them
        • Create a new deployment from an existing app-spec release
        • List all existing deployment(s) and iterate over them
        • Describe an existing deployment
        • Update an existing deployment’s metadata
        • Create app deployment revision from a specific app-spec’s release
        • Describe an app deployment revision
        • List all revision(s) in an app deployment and iterate over them
        • Delete an existing deployment
        • Delete an existing app-spec with all its release(s)
      • Press Blocks
        • Import the press block module and Instantiate a press-block client
        • Prepare payload and create a new workflow block-spec
        • Prepare payload and create a new webapp block-spec
        • List created block-spec(s) and iterate over them
        • Describe an already existing block-spec
        • Update the metadata and discoverability of a block-spec
        • Create a new workflow block-spec release with updated config and release
        • Create a new webapp block-spec release with updated config and release
        • Describe the block-spec release
        • List all release(s) in a block-spec and iterate over them
        • Create a new deployment from a specific block-spec’s release
        • List all existing deployment(s) and iterate over them
        • Describe a block deployment
        • Update an existing deployment’s metadata
        • Get block deployment parameters
        • Update block deployment parameters
        • Create block deployment revision from a specific block-spec’s release
        • Describe a block deployment revision
        • List all revision(s) in a block deployment and iterate over them
        • Delete a block deployment
        • Delete an existing block-spec with all it’s release(s)
      • Press Deployments
        • Import the press deployment module and Instantiate a press-deployment client
        • List all app deployment(s) and block deployment(s) and iterate over them
      • Press Specs
        • Import the press spec module and Instantiate a press-spec client
        • List all app spec(s) and block spec(s) and iterate over them
        • List all deployment(s) for an existing app-spec release
    • Managing Auto-Pagination when available with Peak-SDK
      • Client Side Auto-Pagination
        • Import the press app module and Instantiate a press-app client
        • List created app-spec(s) and iterate over them using auto-pagination with return_iterator=True
        • List created app-spec(s) with auto-pagination disabled
    • Using Templates in Peak-SDK and Peak-CLI
      • Getting familiar with Templates
        • Using template loader along with your own code.
        • Using template loader with CLI commands.
          • Visualizing the template loading logic used within CLI commands
        • Usage Examples
          • Passing parameters in bulk.
          • Passing parameters one by one.
          • The recommended way.
          • A short guide to parameter conventions used within the CLI.
    • Using Compression for Artifacts in Peak-SDK and Peak-CLI
      • Why do we need Artifacts and Compression
        • Usage Examples
          • Basic usage with path and ignore_files
          • Usage without ignore_files
          • Compress without ignore_files and a missing .dockerignore
          • Compress without both ignore_files and .dockerignore
          • Usage with multiple ignore files
          • The recommended way
    • Creating Apps and Blocks via SDK
      • Creating Resource Dependencies with Artifacts
      • Providing Instance Type and Storage in Workflow Block Spec
      • Providing Instance Type in Webapp Block Spec
      • Session Stickiness in Webapp Block
      • Providing Parameters in Blocks.
      • Providing Triggers in Workflow Block Spec
      • Providing Watchers in Workflow Block Spec
      • Providing Image Details for Block Specs
      • Usage Examples
        • Block Specs
          • Creating a Block Spec
          • Creating a new Block Spec Release
        • Block Deployments
          • Creating a new Block Deployment
        • App Specs
          • Creating an App Spec
          • Creating a new App Spec Release
        • App Deployments
          • Creating a new App Deployment
    • Creating Images, Workflows and Webapps via SDK
      • Creating Resource Dependencies with Artifacts
      • Providing Instance Type and Storage in Workflow
      • Providing Instance Type in Webapp
      • Session Stickiness in Webapp
      • Images
        • Creating an image
        • Creating an image version
      • Workflows
        • Creating a workflow
        • Executing a workflow
      • Webapps
        • Creating a webapp
    • Using Tools from Peak-SDK
      • Logging 📓
        • Importing and creating a logging instance 🧪
          • Example 1: Get a default logger
          • Example 2: Get a customised logger
        • Binding and unbinding contexts 🧪
          • Example 1: Bind additional context to logger
          • Example 2: Unbind key(s) from the context
        • Changing log level 🧪
          • Example 1: Change or Set the log level
        • Additional examples 🧪
          • Example 1: Using Formatting Placeholders
          • Example 2: Logging with Structured Data
          • Example 3: Logging Mixed Data Types
          • Example 4: Logging Exceptions
  • SDK Reference
    • Sessions
      • Session
        • Session.create_download_request()
        • Session.create_generator_request()
        • Session.create_request()
    • Compression
      • compress()
      • get_files_to_include()
      • print_file_tree()
      • print_zip_content()
    • Templating
      • API Reference
        • load_template()
      • CLI Reference
        • format_logs()
        • get_client()
        • get_updated_artifacts()
        • parse_build_arguments()
        • parse_params()
        • remove_unknown_args()
        • template_handler()
    • Resources
      • Workflow
        • get_client()
        • Workflow Client
          • Workflow
            • Workflow.create_or_update_workflow()
            • Workflow.create_workflow()
            • Workflow.delete_workflow()
            • Workflow.describe_workflow()
            • Workflow.execute_workflow()
            • Workflow.get_default_resource()
            • Workflow.get_execution_details()
            • Workflow.get_execution_logs()
            • Workflow.list_executions()
            • Workflow.list_resources()
            • Workflow.list_workflows()
            • Workflow.patch_workflow()
            • Workflow.update_workflow()
      • Image
        • get_client()
        • Image Client
          • Image
            • Image.create_image()
            • Image.create_or_update_image_version()
            • Image.create_version()
            • Image.delete_image()
            • Image.delete_version()
            • Image.delete_versions()
            • Image.describe_image()
            • Image.describe_version()
            • Image.get_build_logs()
            • Image.list_image_builds()
            • Image.list_image_versions()
            • Image.list_images()
            • Image.update_version()
      • Artifact
        • get_client()
        • Artifact Client
          • Artifact
            • Artifact.create_artifact()
            • Artifact.create_artifact_version()
            • Artifact.delete_artifact()
            • Artifact.delete_artifact_version()
            • Artifact.describe_artifact()
            • Artifact.download_artifact()
            • Artifact.list_artifacts()
            • Artifact.update_artifact()
      • Webapp
        • get_client()
        • Webapp Client
          • Webapp
            • Webapp.create_or_update_webapp()
            • Webapp.create_webapp()
            • Webapp.delete_webapp()
            • Webapp.describe_webapp()
            • Webapp.list_webapps()
            • Webapp.update_webapp()
      • Tenant
        • get_client()
        • Tenant Client
          • Tenant
            • Tenant.list_instance_options()
    • Press
      • Press-App
        • get_client()
        • Press-App Client
          • App
            • App.create_deployment()
            • App.create_deployment_revision()
            • App.create_spec()
            • App.create_spec_release()
            • App.delete_deployment()
            • App.delete_spec()
            • App.describe_deployment()
            • App.describe_deployment_revision()
            • App.describe_spec()
            • App.describe_spec_release()
            • App.list_deployment_revisions()
            • App.list_deployments()
            • App.list_spec_releases()
            • App.list_specs()
            • App.update_deployment_metadata()
            • App.update_spec_metadata()
      • Press Blocks
        • get_client()
        • Press Blocks Client
          • Block
            • Block.create_deployment()
            • Block.create_deployment_revision()
            • Block.create_spec()
            • Block.create_spec_release()
            • Block.delete_deployment()
            • Block.delete_spec()
            • Block.describe_deployment()
            • Block.describe_deployment_revision()
            • Block.describe_spec()
            • Block.describe_spec_release()
            • Block.get_parameters()
            • Block.list_deployment_revisions()
            • Block.list_deployments()
            • Block.list_spec_releases()
            • Block.list_specs()
            • Block.patch_parameters()
            • Block.update_deployment_metadata()
            • Block.update_spec_metadata()
      • Press-Spec
        • get_client()
        • Press-Spec Client
          • Spec
            • Spec.list_spec_release_deployments()
            • Spec.list_specs()
      • Press-Deployment
        • get_client()
        • Press-Deployment Client
          • Deployment
            • Deployment.list_deployments()
    • Tools
      • Logging
        • LogHandler
          • LogHandler.CONSOLE
          • LogHandler.FILE
        • LogLevel
          • LogLevel.DEBUG
          • LogLevel.INFO
          • LogLevel.WARN
          • LogLevel.ERROR
          • LogLevel.CRITICAL
        • PeakLogger
          • PeakLogger.bind()
          • PeakLogger.critical()
          • PeakLogger.debug()
          • PeakLogger.error()
          • PeakLogger.exception()
          • PeakLogger.info()
          • PeakLogger.set_log_level()
          • PeakLogger.unbind()
          • PeakLogger.warn()
        • get_logger()
  • CLI
    • Getting Started
      • Getting Help
      • Enable Auto-completion
      • Dry Run
      • Paging
      • Output Format
      • Generate YAML Config
    • Usage
      • Using Apps and Blocks via CLI
        • Defining CLI Parameters in App and Block Creation
        • Creating Resource Dependencies with Artifacts
        • Providing Instance Type and Storage in Workflow Block Spec
        • Providing Instance Type in Webapp Block Spec
        • Session Stickiness in Webapp Block
        • Providing Press Parameters in Blocks
        • Providing Triggers in Workflow Block Spec
        • Providing Watchers in Workflow Block Spec
        • Providing Image Details for Block Specs
        • Usage Examples
          • Block Specs
            • Creating a Block Spec
            • Updating Block Spec Metadata
            • Creating a new Block Spec Release
          • Block Deployments
            • Creating a new Block Deployment
            • Creating a new Block Deployment Revision
            • Updating Block Deployment Metadata
            • Getting Block Deployment Parameters
            • Updating Block Deployment Parameters
          • App Specs
            • Creating an App Spec
            • Updating App Spec Metadata
            • Creating a new App Spec Release
          • App Deployments
            • Creating a new App Deployment
            • Creating a new App Deployment Revision
            • Updating App Deployment Metadata
      • Using Images, Workflows and Webapps via CLI
        • Tenants
        • Defining Parameters in Resource Creation
        • Using a combination of command line options and yaml
        • Creating Resource Dependencies with Artifacts
        • Providing Instance Type and Storage in Workflow
        • Providing Instance Type in Webapp
        • Session Stickiness in Webapp
        • Images
          • Creating an image
          • Creating an image version
          • Updating an image version
          • Using the create-or-update operation
          • Deleting Images and Versions
          • Retrieving Image Build Logs
        • Workflows
          • Creating a workflow
          • Updating a workflow
          • Using the create-or-update operation
          • Partial Workflow Update using patch workflow
          • Executing a workflow
          • Retrieving Workflow Execution Details
          • Retrieving Workflow Step Execution Logs
        • Webapps
          • Creating a webapp
          • Updating a webapp
          • Using the create-or-update operation
  • Examples
    • Using Press Runtime Parameters
      • Using Parameters in Workflows
      • Deploying the Workflow
        • Creating the Block Spec
        • Deploying the Spec
        • Updating the Parameters
    • Using Press Build parameters
      • Using Build Parameters in Workflows
        • Creating the Block Spec
        • Deploying the Spec
        • The result
  • Migration Guide
    • Migrating from Peak SDK 0.0.6 to 1.0.0
      • Creation of Images and Webapps without YAML File
    • Migrating from Peak SDK 0.0.5 to 0.0.6
      • Changing release key format
    • Migrating to Peak SDK new CLI
      • Template Parameters
      • Changes in Image resource
      • Changes in Workflow resource
      • Changes in Workflow Specs and Deployments
      • Changes in Apps
  • FAQ
    • Getting started
      • What is Python Virtual Environment and how do I set it up for my project?
      • How do I install the Peak SDK and CLI?
      • I am facing issues with Peak SDK installation even though I am within a virtual environment. How can I resolve these installation problems?
      • How do I obtain an API key to use the Peak SDK and CLI?
      • Where can I find sample code and examples to learn how to use the Peak SDK and CLI?
      • Where can I find references for the available functions in the Peak SDK and commands in the CLI?
    • Managing existing resources
      • How can I manage existing resources such as workflows or block-specs?
      • How do I obtain the ID and Configuration of the resource?
  • Changelog
    • [1.2.0]
    • [1.1.0]
    • [1.0.0]
    • [0.0.6]
    • [0.0.5]
    • [0.0.4]
    • [0.0.3]
  • License
peak-sdk
  • Migration Guide

Migration Guide

  • Migrating from Peak SDK 0.0.6 to 1.0.0
    • Creation of Images and Webapps without YAML File
  • Migrating from Peak SDK 0.0.5 to 0.0.6
    • Changing release key format
  • Migrating to Peak SDK new CLI
    • Template Parameters
    • Changes in Image resource
    • Changes in Workflow resource
    • Changes in Workflow Specs and Deployments
    • Changes in Apps
Previous Next

© Copyright 2024, Peak AI.

Built with Sphinx using a theme provided by Read the Docs.
Other Versions v: v1.2.0
Tags
latest
v0.0.5
v0.0.6
v1.0.0
v1.1.0
v1.10.0
v1.11.0
v1.12.0
v1.13.0
v1.14.0
v1.15.0
v1.15.1
v1.16.0
v1.16.1
v1.17.0
v1.2.0
v1.2.1
v1.3.0
v1.4.0
v1.5.0
v1.6.0
v1.7.0
v1.8.0
v1.9.0