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.10.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.10-py3-none-any.whl (632.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: canopy-9.10.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.10.tar.gz
Algorithm Hash digest
SHA256 4d90a1099f8cbd70d69fc6e17b7151ee456a273cbde421ce5fd0b6e6244dc3fd
MD5 6632aa801cc357f2d5afd6d37b98c7e7
BLAKE2b-256 a624a0a059e1eddc0e4594a01d12cea59952377fe873932d35adcd5c5931848e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: canopy-9.10-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.10-py3-none-any.whl
Algorithm Hash digest
SHA256 101bf9aa50574c3ed3f3fdf7d7ea4f53453eb8c06b00049dce2e76aeaf5ba3ca
MD5 60c07314de26a4552163f6fa8ab40588
BLAKE2b-256 68a359daeffa3362b57dcb53da59f94e760a7fb922e1adf6b428034753300b5d

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