Skip to content

Equation Python Package

The Equation Python package will allow programmatic access to Equation APIs from any Python environment. It is ideal for scripting, automation, and integration use cases where clients like Excel or WaterFuser are too limited.

⚠️ #TODO The public package is not yet available. This page describes the planned usage and capabilities. You can still use the Equation API directly in Python, but the package will simplify this process.

✅ When to Use the Python Client

Use the Python package if you:

  • Want to run calculations in notebooks, scripts, or pipelines
  • Need to automate workflows involving multiple API calls
  • Prefer code-based control over GUI interactions
  • Are integrating Equation logic into other systems or platforms

🚀 How It Will Work

The Python client will:

  • Expose a class-based interface to Equation APIs
  • Handle authentication via Azure CLI or managed identity
  • Automatically fetch and validate OpenAPI specs
  • Format inputs and parse results into native Python structures

Example usage (planned):

python
from equation import EquationClient

client = EquationClient(environment="acceptance")
client.login()  # Uses Azure CLI or device login

api = client.get_api("waterfuser")
result = api.calculate(flow=123, sludge_age=15)
print(result.output_volume)

🔧 Setup (Coming Soon)

Once available, the package will be:

  • Installable via pip install equation-client
  • Published to Haskoning’s internal package registry
  • Linked with authentication helpers from Azure SDK

📎 When released, this page will link to full documentation and usage examples.

🛠️ Troubleshooting

IssuePlanned Handling
Token not foundWill prompt device login or use Azure CLI
Invalid API name or inputWill raise clear Python exceptions
Connection or timeout errorWill retry or surface a clean error message

If your use case involves loops, decision logic, or integration with other Python tools — the Equation package will provide the most flexible option.