Skip to main content

FERS_calculations

FERS_calculations is a high-performance library for Rust-backed calculations in mechanical engineering. It can process JSON input files to deliver fast and accurate results. While it can be run as a standalone tool, integration with FERS_core simplifies input creation and workflow management.

Features

  • Standalone Functionality: Run directly by providing a valid JSON input file.
  • Rust-Powered Performance: Designed for speed and reliability in computational tasks.
  • Python Integration: Seamless integration with FERS_core for easy preprocessing and result handling.
  • Engineer-Friendly Design: Minimal coding effort required for complex structural engineering calculations.

Installation

pip install fers_calculations

This installs the pre-built Rust bindings -- no Rust toolchain required.

Usage

Standalone (Python)

You can call fers_calculations directly from Python without FERS_core:

import fers_calculations

# Load your JSON input
with open("001_cantilever_with_end_load.json") as f:
    json_data = f.read()

# Run the analysis
results_json = fers_calculations.calculate_from_json(json_data)

# Save the results
with open("results.json", "w") as f:
    f.write(results_json)

Premium licensing and timeouts

Passing api_key unlocks Premium model limits. That is the only thing that makes the library contact the network — omit it and no request is ever sent.

Because a licence check is a network call, it is bounded. If ferscloud.com does not answer within license_timeout seconds (default 30) the call raises fers_calculations.FersTimeoutError before the solve starts, so retrying is always safe:

import fers_calculations

try:
    fers_calculations.calculate_to_file(
        json_data, "results.json", api_key=KEY, license_timeout=60
    )
except fers_calculations.FersTimeoutError:
    ...  # transient — retry or skip this model

FersTimeoutError subclasses the built-in TimeoutError, so except TimeoutError catches it too. A definitive failure — an invalid key, a non-premium account, an unreachable host — raises RuntimeError instead, since retrying those is pointless.

license_timeout bounds the licence handshake only, not the solve. To put a hard ceiling on a whole solve, run it in a killable subprocess.

Two environment variables are read (real process environment only — .env files are loaded by the CLI binary, never by this extension module):

Variable Purpose Default
FERS_LICENSE_TIMEOUT Default license_timeout, in seconds 30
FERS_CLOUD_URL Base URL of the licence API https://ferscloud.com

For a more ergonomic workflow, install FERS_core which handles model creation, calling the Rust engine, and post-processing / visualisation:

pip install fers-core
from fers_core import FERS

model = FERS.from_json("001_cantilever_with_end_load.json")
model.calculate()
model.plot_results_3d()

See FERS_core on PyPI for full documentation.

Licence

From 0.2.70 the engine is licensed under the PolyForm Strict License 1.0.0 (see LICENSE). It is free for any noncommercial purpose: study, teaching, research, hobby projects, and use by schools, charities and public bodies. Models of more than 100 members need a Pro solve token.

Commercial use, at any model size, needs a paid FERS Cloud plan, which includes the commercial licence. The licence does not allow modifying or redistributing the package.

Metadata

Release files for fers-calculations 0.2.71

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for fers-calculations 0.2.71
File Interpreter ABI Platform
fers_calculations-0.2.71-cp39-abi3-win_amd64.whl CPython 3.9 abi3 Windows x86-64 Details
fers_calculations-0.2.71-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.9 abi3 Linux glibc 2.17+ x86-64 Details
fers_calculations-0.2.71-cp39-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl CPython 3.9 abi3 macOS 11.0+ ARM64, macOS 10.12+ universal2 (ARM64, x86-64), macOS 10.12+ x86-64 Details

Total release size: 20.7 MB

Release files / fers_calculations-0.2.71-cp39-abi3-win_amd64.whl

Download URL fers_calculations-0.2.71-cp39-abi3-win_amd64.whl
Size 3.1 MB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
d6f86463b735082eaac5af56b0d4f00e83829520478efbaedd912c8ae34c9759
BLAKE2b-256 checksum
How to use checksums
58122e1a2b5e19c396f4f3e676acd03668aae53848a66a1325a84f438a44c4cf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

Release files / fers_calculations-0.2.71-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL fers_calculations-0.2.71-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 11.5 MB
Tags CPython 3.9 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
0593938171aff91a5db4fb465837acadec9107e38e580d5208b84893499810cd
BLAKE2b-256 checksum
How to use checksums
6a9772a5d617c727d3b93ed7948083f4a9e781958bdc5e572c8dc2b819da0947
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

Release files / fers_calculations-0.2.71-cp39-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl

Download URL fers_calculations-0.2.71-cp39-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Size 6.1 MB
Tags CPython 3.9 abi3 macOS 10.12+ universal2 (ARM64, x86-64) macOS 10.12+ x86-64 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
fec59e4582d2d94397d5883f4d8cda95f8022cde6ca04f49cc663e623e053812
BLAKE2b-256 checksum
How to use checksums
5d1736ba4e778103667c3302788e0cc88a183d51837d9b54294a108ede6c6902
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

Release history Release notifications | RSS feed

This release

0.2.71 This release

3 release files

0.2.70

3 release files

0.2.69

3 release files

0.2.68

3 release files

0.2.67

3 release files

0.2.66

3 release files

0.2.65

3 release files

0.2.64

3 release files

0.2.57

3 release files

0.2.55

3 release files

0.2.54

3 release files

0.2.53

3 release files

0.2.52

3 release files

0.2.51

3 release files

0.2.50

3 release files

0.2.49

3 release files

0.2.41

3 release files

0.2.39

3 release files

0.2.38

3 release files

0.2.37

3 release files

0.2.36

3 release files

0.2.35

3 release files

0.2.25

3 release files

0.2.24

3 release files

0.2.23

3 release files

0.2.21

3 release files

0.2.20

3 release files

0.2.9

3 release files

0.2.8

3 release files

0.2.7

3 release files

0.2.6

3 release files

0.2.5

3 release files

0.2.4

3 release files

0.2.3

3 release files

0.2.2

3 release files

0.2.1

3 release files

0.1.99

3 release files

0.1.98

3 release files

0.1.97

3 release files

0.1.96

3 release files

0.1.95

3 release files

0.1.94

3 release files

0.1.93

3 release files

0.1.92

3 release files

0.1.91

4 release files

0.1.90

3 release files

0.1.89

3 release files

0.1.88

3 release files

0.1.87

3 release files

0.1.86

3 release files

0.1.85

3 release files

0.1.84

3 release files

0.1.83

3 release files

0.1.82

3 release files

0.1.81

3 release files

0.1.80

3 release files

0.1.79

3 release files

0.1.78

3 release files

0.1.77

3 release files

0.1.76

3 release files

0.1.72

3 release files

0.1.71

3 release files

0.1.70

3 release files

0.1.69

3 release files

0.1.65

3 release files

0.1.64

3 release files

0.1.63

3 release files

0.1.62

3 release files

0.1.61

3 release files

0.1.60

3 release files

0.1.59

3 release files

0.1.58

3 release files

0.1.57

3 release files

0.1.56

3 release files

0.1.55

3 release files

0.1.54

3 release files

0.1.53

3 release files

0.1.52

3 release files

0.1.51

3 release files

0.1.50

3 release files

0.1.49

3 release files

0.1.48

3 release files

0.1.47

3 release files

0.1.46

3 release files

0.1.45

3 release files

0.1.44

3 release files

0.1.39

3 release files

0.1.38

3 release files

0.1.37

3 release files

0.1.36

3 release files

0.1.35

3 release files

0.1.34

3 release files

0.1.33

3 release files

0.1.32

3 release files

0.1.31

3 release files

0.1.30

3 release files

0.1.29

3 release files

0.1.28

3 release files

0.1.27

3 release files

0.1.23

2 release files

0.1.22

3 release files

0.1.21

3 release files

0.1.20

3 release files

0.1.19

3 release files

0.1.17

3 release files

0.1.16

2 release files

0.1.15

2 release files

0.1.14

2 release files

0.1.10

1 release file

0.1.9

1 release file

0.1.8

1 release file

0.1.7

1 release file

0.1.6

1 release file

0.1.5

1 release file

0.1.4

1 release file

0.1.3

1 release file

0.1.2

1 release file

0.1.1

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page