Skip to main content

OpenStaad

PyPI Downloads

[!WARNING] The class-based API is deprecated. The standalone classes (Root(), Geometry(), Load(), Output(), Properties(), View(), Design(), Command(), Support()) are deprecated in the 0.0.x releases and will be removed in 0.1.0. Instantiating any of them now emits a FutureWarning. Use the new single-import session API instead: from openstaad import opsops.connect(). See Migration below, or the full migration guide.

Abstract

openstaad python is a starting project to wrap the official OpenStaad API functionalities into a Python package.

It aims to facilitate the connection between StaadPRO and Python, avoiding boilerplate code and type management, allowing the user to focus on the real automation tasks.

Quick Info

  • openstaad is a Python package to call easily functions from the OpenStaad API.
  • Require a StaadPRO and a valid file open to connect
  • MIT-License
  • The intended audience is StaadPro users with knowledge of Python
  • Compatibitity:
    • Tested with Python 3.10.9
    • Operating System: Windows 11
  • Dependencies:

Installation

Basic installation by pip.

pip install openstaad

A simple example

For the next example, a valid STAAD.Pro file should be open.

from openstaad import ops

# Connect to the running STAAD.Pro session (a valid .STD file must be open)
s = ops.connect()

# Function that returns a list
beam_list = s.GetBeamList()

# Function that returns a string
file_name = s.GetSTAADFile()

# Function that receives an argument
beam_number = 10
beam_nodes = s.GetMemberIncidence(beam_number)

print(beam_list)
print(file_name)
print(beam_nodes)

Migration

The class-based API is deprecated and will be removed in 0.1.0. Migrating is almost entirely mechanical: method names stay the same — you just consolidate the per-domain instances (Geometry(), Root(), …) into a single session object returned by ops.connect() and route every call through it.

# Legacy (deprecated)
from openstaad import Geometry, Root
geometry = Geometry()
root = Root()
beams = geometry.GetBeamList()

# New
from openstaad import ops
s = ops.connect()
beams = s.GetBeamList()

A few methods need manual attention:

Renamed

  • GetElementGlobalOffsetGetElementGlobalOffSet
  • GetElementOffsetSpecGetElementOffSetSpec
  • AddResponseSpectrumLoadExAddResponseSpectrumLoad (signature also changes: data_pairs moves to the last argument)

Removed

  • IsRelease() — no direct replacement; call GetMemberReleaseSpecEx() and evaluate the result yourself.

Same name, different result (behavior changes)

  • Coordinates and lengths are no longer rounded to 3 decimals — full precision is returned.
  • GetApplicationVersion no longer includes the "Version " prefix.
  • GetAnalysisStatus dict key "CPUTime(sec)" is now "CPUTime".
  • NewSTAADFile no longer creates subfolders and now requires three arguments.
  • SaveModel parameter changed from silent: int to saveSilent: bool.

Full guide: https://www.openstaad.com/docs/migration_guide.

Website

www.openstaad.com

Contribution

The source code of openstaad can be found at GitHub, target your pull requests to the main branch:

https://github.com/OpenStaad/OpenStaadPython/pulls

Feedback

Questions and feedback at GitHub Discussions: https://github.com/OpenStaad/OpenStaadPython/discussions

Issue tracker at GitHub: https://github.com/OpenStaad/OpenStaadPython/issues

Contact

Please always post questions at the forum to make answers available to other users as well.

Feedback is greatly appreciated.

Konrad

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

openstaad-0.0.15.tar.gz (70.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

openstaad-0.0.15-py3-none-any.whl (74.2 kB view details)

Uploaded Python 3

File details

Details for the file openstaad-0.0.15.tar.gz.

File metadata

  • Download URL: openstaad-0.0.15.tar.gz
  • Upload date:
  • Size: 70.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for openstaad-0.0.15.tar.gz
Algorithm Hash digest
SHA256 e2568428cb14fcdc7901c73de06b7e226e7ec3279c28425e6bb727001fac201c
MD5 a90b84eb3b63e7a5c4ee68abd6914582
BLAKE2b-256 1f756c8952dd54cf95b2f0f0ffb6550267480c52aa1f02cc87b206cc74879219

See more details on using hashes here.

Provenance

The following attestation bundles were made for openstaad-0.0.15.tar.gz:

Publisher: release.yaml on OpenStaad/OpenStaadPython

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file openstaad-0.0.15-py3-none-any.whl.

File metadata

  • Download URL: openstaad-0.0.15-py3-none-any.whl
  • Upload date:
  • Size: 74.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for openstaad-0.0.15-py3-none-any.whl
Algorithm Hash digest
SHA256 79329780090be82f5d2a523f326b70cc7f2e9cbb9f947a45ba7d955685e33cab
MD5 3b7e6638c42dcd042a645630bbf40aa8
BLAKE2b-256 c98162843e8bd032e5d5e726ec4d6b9d8bba0e96cfdbd208bbdff1de26138b80

See more details on using hashes here.

Provenance

The following attestation bundles were made for openstaad-0.0.15-py3-none-any.whl:

Publisher: release.yaml on OpenStaad/OpenStaadPython

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.0.15 This release

2 files

0.0.14

2 files

0.0.13

2 files

0.0.12

2 files

0.0.11

2 files

0.0.10

2 files

0.0.9

2 files

0.0.8

2 files

0.0.7

2 files

0.0.6

2 files

0.0.5

2 files

0.0.4

2 files

0.0.3

2 files

0.0.2

2 files

0.0.1

2 files

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