Metadata-Version: 2.3
Name: FLOPS_modern_interface
Version: 0.0.1
Summary: Python pydantic classes for FLOPS input/output and web service
Project-URL: Homepage, https://cranfield-university-aedg.github.io/Pages/
Author-email: Sergio Jimeno <s.jimeno@cranfield.ac.uk>
License-File: LICENSE
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.11.9
Requires-Dist: pydantic>=2.7.4
Requires-Dist: requests>=2.32
Description-Content-Type: text/markdown

# FLOPS python

"Python pydantic classes for FLOPS input/output and web service"

Run from web service:

```python
# Path to your input file
input_file = "your-input-file.in.json"

# Parse input file and update input values if needed
flops_input = flops.input_from_json_file(input_file)
flops_input.CONFIN.DESRNG = 1800

# Execute from web API
url = "https://your-python-web-service-url.net"
flops_output = flops.run_flops_api_from_input(flops_input, url)

# Process output
print(flops_output.OBJ_VAR_CONSTR_SUMMARY.RANGE)
```

Run locally:

```python
# Path to your flops directory and input file
flops_directory = "path/to/flops/folder"
input_file = "your-input-file.in.json"

# Execute directly from file (generates test.out.json file)
flops.run_flops_from_json_file(input_file, flops_directory)

# Or parse input from  and update input values if needed Inspect output object.
flops_input = flops.input_from_json_file(input_file)
flops_input.CONFIN.DESRNG = 2200

# Execute locally
flops_output = flops.run_flops_from_input(flops_input, flops_directory)

# Process output
print(flops_output.OBJ_VAR_CONSTR_SUMMARY.RANGE)
```