Metadata-Version: 2.4
Name: eddy-solve
Version: 0.1.0
Summary: Eddy — geometry, physics and space behind one typed API. The Python client, generated from the engine's OpenAPI document.
Author: Eddy
License-Expression: Apache-2.0
Project-URL: Homepage, https://eddy.engineer
Project-URL: Documentation, https://eddy-ac74d702.mintlify.site/sdks/python
Keywords: fea,cfd,electromagnetics,optics,simulation,cad,engineering
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Physics
Classifier: Typing :: Typed
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# eddy-solve

The Eddy SDK for Python — every operation of the engine's API as a typed method, generated from the engine's own OpenAPI document (version 0.1.0). Standard library only; Python 3.9+.

```bash
pip install eddy-solve
```

```python
from eddy_solve import Eddy

eddy = Eddy("http://127.0.0.1:8080", api_key=None)  # or EDDY_BASE_URL / EDDY_API_KEY
result = eddy.solve_structural(
    geometry={"primitive": {"box": {"lx": 1.0, "ly": 0.2, "lz": 0.2}}},
    material={"id": "steel", "e": 210e9, "nu": 0.3, "rho": 7850, "yield": 250e6},
    loads=[{"region": "x_max", "force": [0, 0, -1000]}],
    constraints=[{"region": "x_min", "fixed": "all"}],
    mesh_opts={"element_size": 0.1},
)
print(result["result_id"], result["cached"], result["metrics"])
u = eddy.field(result, "displacement")   # Field: 3 components per node
print(u.count, "nodes, max |u| =", u.max_magnitude())
assert eddy.verify_report(result["result_id"])["matches"]
```

- **Errors** are `EddyError` with `.code` (the API's error code), `.message`, `.status`.
- **Async jobs**: a `202` is followed through `poll` to the result; `_wait=False` returns the handle, `wait_for_job(job)` / `job_events(job_id)` finish it.
- **Blobs** go through a content-addressed local cache (`EDDY_CACHE_DIR`, default `~/.cache/eddy-solve/blobs`; `cache_dir=False` disables it); `field(result, name)` decodes an `SSFLD1` blob into a `Field`.
- **Retries** with backoff: content-addressed operations and every `GET` on any transport failure; other `POST`s only when the engine was not reached.

The reference: https://eddy-ac74d702.mintlify.site/sdks/python — one method per operation, `snake_case` of the operation id.

Generated by `superstring --emit-sdk python`; do not edit by hand.
