Skip to content

Latest commit

 

History

History
43 lines (30 loc) · 1.29 KB

File metadata and controls

43 lines (30 loc) · 1.29 KB
description The Code Ocean Python SDK makes it even easier to leverage the full functionality of the extensive Code Ocean Public API in your Python scripts and applications.
metaLinks
alternates

Python SDK

Installation

{% hint style="info" %} The Python SDK requires Python >=3.11 and Code Ocean >=2.19 {% endhint %}

The SDK can be installed via pip as shown below:

pip install -U codeocean

For development, install from source with:

pip install -e .[dev] -

Authentication

When creating a CodeOcean client as shown below, you will use your Code Ocean API token. The Python library will then automatically send this key in each request. You can learn more about creating a Code Ocean API Token in our guide here.

from codeocean import CodeOceanclient = CodeOcean(domain="https://{domain}", token="cop_d23dasd312")

Examples

The Capsule, Computation, and Data Asset sections of the Code Ocean API Guide all contain examples using the Python SDK.