Skip to main content

Peak SDK

PyPI Python Version License

What is Peak SDK?

Peak SDK is a Python-based package which can be used to build AI applications in Peak Platform. The Peak SDK provides an efficient code-based interface to manage platform resources (Web Apps, Workflows and Images). It also includes an interface to use Press API which can help you efficiently create, manage and deploy Press Applications on the Peak.

Getting Started

Setting up a Virtual Environment

To ensure a smooth development experience with Peak SDK, we highly recommend creating a Python virtual environment. A virtual environment helps to isolate the dependencies required by your project and prevents conflicts with other projects or the system's global Python environment.

Follow these steps to create a virtual environment using Python's built-in venv module:

  1. Open a terminal.

  2. Navigate to your project's root directory (where you plan to work with the Peak SDK).

  3. Create a new virtual environment with the following command:

    python3 -m venv <venv_name>
    
  4. Activate the virtual environment by running:

    source <venv_name>/bin/activate
    
  5. You will now be working within the virtual environment, and you can install dependencies and run the project without affecting other projects on your system's Python environment.

  6. When you're finished working on your project, you can deactivate the virtual environment using the following command:

    deactivate
    

Installation

  • You can install the Peak SDK with the following command using pip

    pip install peak-sdk
    

    Or if you want to install a specific version

    pip install peak-sdk==<version>
    
  • The Peak SDK ships with the CLI as well. Once CLI is installed, you can enable auto-completion for your shell by running peak --install-completion ${shell-name} command, where shell can be one of [bash|zsh|fish|powershell|pwsh].

  • Once this has run, we need to add compinit to the shell configuration file (like - .zshrc, .bashrc, etc). To do so, you can the following command

    echo "compinit" >> ~/.zshrc # replace .zshrc with your shell's configuration file
    

Checking Package Version

  • As mentioned above, the Peak SDK ships with a CLI as well. You can check the version of both the CLI and the SDK quite easily.

  • You can check the version for the peak-cli using the following command

    peak --version
    

    This should return a response of the following format

    peak-cli==1.24.0
    Python==3.12.3
    System==Darwin(23.6.0)
    
  • To check the version of the peak-sdk, the following code snippet can be used

    import peak
    
    print(peak.__version__)
    

    This should print the version of the SDK

    1.24.0
    

Using the SDK and CLI

  • To start using the SDK and CLI, you'll need a Personal Access Token (PAT).
  • If you don't have one yet, sign up for an account on the Peak platform to obtain your Personal Access token (PAT).
  • To export it, run the following command in your terminal and replace <peak_auth_token> with your actual PAT:
    export PEAK_AUTH_TOKEN=<peak_auth_token>
    

Documentation

You can access the documentation for the SDK and CLI at https://docs.peak.ai/sdk/latest/. Here are some quick links to help you navigate easily:

Platform Support

Support across Python versions on major 64-bit platforms
Python Version Linux MacOS Windows
3.8 🟢 🟢 🟤
3.9 🟢 🟢 🟤
3.10 🟢 🟢 🟤
3.11 🟢 🟢 🟤
3.12 🟢 🟢 🟤
Legend
Key Status Description
🟢 Supported regularly tested, and fully supported
🟡 Limited Support not explicitly tested but should work, and supported on a best-effort basis
🟤 Not Tested should work, but no guarantees and/or support

More Resources

Metadata

Release files for peak-sdk 1.30.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for peak-sdk 1.30.0
File Size Uploaded Provenance Actions
peak_sdk-1.30.0.tar.gz 178.5 kB Without provenance Details for peak_sdk-1.30.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for peak-sdk 1.30.0
File Interpreter ABI Platform Actions
peak_sdk-1.30.0-py3-none-any.whl Python 3 none any Details for peak_sdk-1.30.0-py3-none-any.whl

Total release size: 492.0 kB

Release files / peak_sdk-1.30.0.tar.gz

Download URL peak_sdk-1.30.0.tar.gz
Size 178.5 kB
Tags Source
SHA-256 checksum
How to use checksums
6e4f6db687bb3fb280f5f53d65a4a001b3f16b388fccaa6597e21f8083faf398
BLAKE2b-256 checksum
How to use checksums
734fc7ff8c9c2d76cd2bc65c0ec6718b77d19c54908fca29b4804a87d0c63620
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.13

Release files / peak_sdk-1.30.0-py3-none-any.whl

Download URL peak_sdk-1.30.0-py3-none-any.whl
Size 313.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b17393b60cff365615ee8f66c1f415f9d9cb53a05c5ec0545fb7a9a182a840cd
BLAKE2b-256 checksum
How to use checksums
318158a9e731982001e3f2b77c4a83ecaff1d745f6547c8de3dce0fed6383822
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.13

Security for peak-sdk 1.30.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.30.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page