Metadata-Version: 2.4
Name: dnv_bladed_results
Version: 2.2.0
Summary: An API for working with results from any Bladed version.
Author-email: DNV <renewables.support@dnv.com>
License: MIT License
        
        Copyright (c) 2023 DNV
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
Project-URL: homepage, https://www.dnv.com/software/services/bladed/
Keywords: bladed,results
Classifier: Operating System :: Microsoft :: Windows
Classifier: Programming Language :: Python :: 3
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: Programming Language :: Python :: 3.14
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy==2.*,>=2.0.2
Dynamic: license-file

# Bladed Results API Version 2

The Bladed Results API v2 is an easy, fast, and robust way to access Bladed results using Python.

It provides features for:

- Searching a directory tree for Bladed runs.
- Returning variables and data.
- Reporting run, group, and variable metadata.
- Writing user-defined output groups.

The API is able to read results from any Bladed version.

The API depends on the [`numpy`](https://numpy.org) package, version 2.0.2 or later.

> Currently only Windows is supported.
>
> Bladed Results API v2 replaces Results API 1.x which has been discontinued.

## Pre-requisites

- Requires a 32- or 64-bit Windows installation of any Python version from **3.9** to **3.14** inclusive.

> 64-bit Python is recommended.

- The Results API has been tested on Windows 11.

## Quick Start

```shell
pip install --upgrade dnv-bladed-results
```

```python
from dnv_bladed_results import ResultsApi

run = ResultsApi.get_run("c:/Data/5MW", "powprod")

var_1d = run.get_variable_1d("rotating hub mx")
print(var_1d.get_data())

var_2d = run.get_variable_2d("blade 1 mx (principal elastic axes)")
# Print loads 28.5m from root:
print(var_2d.get_data_at_value(28.5))
# Equivalent using blade station index:
print(var_2d.get_data_at_index(3))
```

## Learn More

Visit the [`Knowledge Centre`](https://mysoftware.dnv.com/download/public/bladed/site/documentation/Workflow/analysingOutputs/ResultsAPI.html) for more information about the Results API v2.
