No project description provided
Project description
CalcTree Python Client
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
Built Distribution
File details
Details for the file calctree-0.2.3.tar.gz
.
File metadata
- Download URL: calctree-0.2.3.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.11.7 Darwin/23.4.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c511fc20243a7f625a34562bf92f26e59e4a6d5b978b6bc84a4b4c80dc65e948 |
|
MD5 | 359e37e379a48e21c006531aee569fe6 |
|
BLAKE2b-256 | 5d8469efbd120c9d918ba0af73d41789d924093acb2905e230df63b71972e970 |
File details
Details for the file calctree-0.2.3-py3-none-any.whl
.
File metadata
- Download URL: calctree-0.2.3-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.11.7 Darwin/23.4.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bd3c85d361e2fc75e99fffa2c1ad284a2bfd87065d17cbbe8051c7de9ad45ebb |
|
MD5 | 52bf993468f946f573996b8998b2039d |
|
BLAKE2b-256 | aabf1ef0060a909cfe356009a4cf337335562e04d1238bd700d570eb341cb07d |