Skip to main content

No project description provided

Project description

CalcTree Python Client

GitHub Workflow Status

The CalcTree Python Client is a Python library that provides a convenient interface for interacting with the CalcTree API. It allows you to perform calculations using CalcTree's powerful calculation engine.

Installation

You can install the CalcTree Python Client using pip:

pip install calctree

Getting Started

To use the CalcTree Python Client, you need to obtain an API key from CalcTree. Once you have your API key, you can initialize the client and start running calculations.

Remember to replace YOUR_API_KEY with your actual API key, YOUR_PAGE_ID with the ID of the page you want to run calculations on, and YOUR_PARAM_NAME with the name of the parameter you want to set the value for.

import json

from calctree.client import CalcTreeClient

client = CalcTreeClient('YOUR_API_KEY')

res = client.run_calculation("YOUR_PAGE_ID",
                             [{"name": "YOUR_PARAM_NAME", "formula": "1000"}]
                             )

print("Result as a dictionary:")
print(result.to_dict())

print("Value of param 'cylinder_radius':")
print(result.get_param_value("cylinder_radius"))

print("List of params:")
print(result.get_params())

print("List of values:")
print(result.get_values())

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

calctree-0.2.3.tar.gz (3.6 kB view hashes)

Uploaded Source

Built Distribution

calctree-0.2.3-py3-none-any.whl (4.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page