Skip to main content

Python Client for the Canopy Simulation API

Project description

Canopy Python Client

The official Python client for the Canopy Simulations API.

This package enables Canopy customers to interact with the Canopy platform from Python, for example using Jupyter Notebooks, to run simulations, load results, and manage configurations programmatically.

Installation

pip install canopy

Requirements

  • Python 3.10 or higher.

Quick Start

Create a session and load output channels from a study:

import canopy

async with canopy.Session(client_id="<your_client_id>", username="<your_username>") as session:
    study_data = await canopy.load_study(session, "<study_id>", "DynamicLap", ["sRun", "vCar"])

You will be prompted for your client secret and password on first use. Alternatively, pass them into the Session constructor directly (after retrieving them from a secure location).

Synchronous Usage

If you cannot use async/await, use the synchronous wrapper:

import canopy

with canopy.Session(client_id="<your_client_id>", username="<your_username>") as session:
    study_data = canopy.run(canopy.load_study(session, "<study_id>", "DynamicLap", ["sRun", "vCar"]))

Features

  • Study & Job Loading — Load study results, job data, scalar results, and vector channel data.
  • Parquet Support — Channel data is loaded from Parquet files where available for improved performance, with automatic fallback to legacy binary formats.
  • Configuration Management — Create, find, load, update, and delete simulation configurations.
  • Study Management — Create, find, load, and delete studies. Wait for studies to complete.
  • Unit Conversion — Convert results into your preferred units for display.
  • Async & Sync — All helper functions support asyncio for efficient parallel downloads. A synchronous wrapper (canopy.run) is provided for environments without async support.
  • Proxy Support — Configure proxy servers via the Session object.

Examples

See the Canopy Python Examples repository for detailed usage examples.

Documentation

License

This project is licensed under the MIT License.

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

canopy-9.7.tar.gz (217.9 kB view details)

Uploaded Source

Built Distribution

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

canopy-9.7-py3-none-any.whl (632.5 kB view details)

Uploaded Python 3

File details

Details for the file canopy-9.7.tar.gz.

File metadata

  • Download URL: canopy-9.7.tar.gz
  • Upload date:
  • Size: 217.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.20

File hashes

Hashes for canopy-9.7.tar.gz
Algorithm Hash digest
SHA256 789aa4591132bc3de8467db690e5d0bbbcd9f572ff43f3459c1484b3a2ed27ca
MD5 be7622ddcdbdd5b2c150604411164374
BLAKE2b-256 fe741008a614bec7cf2b8b42cc93641ca6825d688415b72cc03e0ba078252317

See more details on using hashes here.

File details

Details for the file canopy-9.7-py3-none-any.whl.

File metadata

  • Download URL: canopy-9.7-py3-none-any.whl
  • Upload date:
  • Size: 632.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.20

File hashes

Hashes for canopy-9.7-py3-none-any.whl
Algorithm Hash digest
SHA256 bc037a8729db09cee42342706446cda3a1fdb6163523bdfebd9ead3ee21a2965
MD5 33637ff82b7b73faa1ef7b218c20e1fc
BLAKE2b-256 cadd55440b39e40227830847156c0efe7e1ff795c01ea28de24ab057768ad84d

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