Python SDK for interacting with the Peak platform
Project description
Peak SDK
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:
-
Open a terminal.
-
Navigate to your project's root directory (where you plan to work with the Peak SDK).
-
Create a new virtual environment with the following command:
python3 -m venv <venv_name> -
Activate the virtual environment by running:
source <venv_name>/bin/activate -
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.
-
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
pippip 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
compinitto the shell configuration file (like - .zshrc, .bashrc, etc). To do so, you can the following commandecho "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-cliusing the following commandpeak --versionThis should return a response of the following format
peak-cli==1.23.0 Python==3.12.3 System==Darwin(23.6.0)
-
To check the version of the
peak-sdk, the following code snippet can be usedimport peak print(peak.__version__)
This should print the version of the SDK
1.23.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
| Python Version | Linux | MacOS | Windows |
|---|---|---|---|
| 3.8 | 🟢 | 🟢 | 🟤 |
| 3.9 | 🟢 | 🟢 | 🟤 |
| 3.10 | 🟢 | 🟢 | 🟤 |
| 3.11 | 🟢 | 🟢 | 🟤 |
| 3.12 | 🟢 | 🟢 | 🟤 |
| 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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file peak_sdk-1.23.0.tar.gz.
File metadata
- Download URL: peak_sdk-1.23.0.tar.gz
- Upload date:
- Size: 149.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
24ba677e5c531004838ee99ee7ea0d83555ea924127a4635c8b3c077accf9cb5
|
|
| MD5 |
1c6e0161a9e320333acc210c3d66f229
|
|
| BLAKE2b-256 |
3f083ab92373bfbb012b1cf6a550c741babd38f2b25c7731889a7ce07cf561e2
|
File details
Details for the file peak_sdk-1.23.0-py3-none-any.whl.
File metadata
- Download URL: peak_sdk-1.23.0-py3-none-any.whl
- Upload date:
- Size: 253.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c156a9f040dfd59dec4ae3f2f350e9df9c0d19267e9c8e5632693d9ebcfb388b
|
|
| MD5 |
7e57b239658a481b0ac3bd83a8e36c1d
|
|
| BLAKE2b-256 |
6341df2f606a0b7576f9c4c375b076540a33cab388265a6a5bcc22226f98b379
|