Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

steelsnakes

Logo

Python Version License PyPI Version Documentation PyPI Downloads

A python library for structural steel: section properties, classification and member design checks, plus a finite-element section-analysis engine (built on sectionproperties). Currently supports 🇬🇧 UK, 🇪🇺 EU, 🇺🇸 US (imperial and 🇺🇸 US_Metric in SI units), with member design checks to AISC 360-22 (Chapters C-H, LRFD), EN 1993-1-1 (Sections 6 and 7, ULS and SLS) and, on UK sections, the legacy 🇬🇧 BS 5950-1:2000 (Sections 2.4, 2.5, 3, 4). Active development: 🇮🇳 IN. Scaffolded/early modules: 🇦🇺 AU, 🇳🇿 NZ, 🇯🇵 JP. Future expansion candidates: 🇲🇽 MX, 🇿🇦 SA, 🇨🇳 CN, 🇨🇦 CA, 🇰🇷 KR.

Quick Start

Installation

pip install steelsnakes

For local development:

python -m venv .venv
source .venv/Scripts/activate   # Windows (Git Bash)
pip install -e .

Basic Usage

from steelsnakes.UK import UB, UC, PFC

# Create section objects using the designations
beam = UB("457x191x67") # Universal Beam
column = UC("305x305x137") # Universal Column
channel = PFC("430x100x64") # Parallel Flange Channel

# Access properties immediately
print(f"Beam moment of inertia: {beam.I_yy} cm⁴")
print(f"Column mass: {column.mass_per_metre} kg/m")
print(f"Channel shear center: {channel.e0} mm")

Documentation

Eurocode Classification Example

from steelsnakes.EU import (
    IPE,
    ElementInput,
    ElementStressDistribution,
    StressPattern,
    classify_section,
)

section = IPE("IPE-750x220")

compression_result = classify_section(section=section, fy_mpa=355.0)

bending_result = classify_section(
    section=section,
    fy_mpa=355.0,
    stress_pattern="bending-major-axis",
)

combined_result = classify_section(
    fy_mpa=275.0,
    custom_elements=[
        ElementInput(
            name="web",
            kind="internal",
            c_mm=360.4,
            t_mm=7.7,
            stress=ElementStressDistribution.COMBINED,
            alpha=0.70,
        )
    ],
)

print(compression_result.section_class)
print(bending_result.section_class)
print(combined_result.section_class)

stress_pattern accepts either a simple string like "compression" or "bending-major-axis", or the enum value StressPattern.MAJOR_AXIS_BENDING.

EN 1993-1-1 (Eurocode 3) Member Checks Example

from steelsnakes.EU import IPE
from steelsnakes.EU.checks.uls import check_bending, check_lateral_torsional_buckling

beam = IPE("IPE-450")

bending = check_bending(section=beam, fy=355.0, M_Ed=300e6)  # 6.2.5; forces in N, mm, N/mm²
print(bending.M_c_Rd / 1e6, bending.section_class, bending.utilisation.utilisation)  # 603.5 kNm, Class 1, 0.497

ltb = check_lateral_torsional_buckling(section=beam, fy=355.0, L=6000.0, M_Ed=300e6)  # 6.3.2
print(ltb.M_b_Rd / 1e6)  # kNm

Deflections and other serviceability checks are in steelsnakes.EU.checks.sls.

AISC 360-22 Member Checks Example

from steelsnakes.US import check_axial_flexure_interaction, compression, flexure
from steelsnakes.US.checks import calculate_B2, calculate_Pe_story, calculate_RM, notional_load
from steelsnakes.US.sections.beams import W_beam

column = W_beam("W14X132")
Pc = compression(section=column, Fy=50.0, L=30 * 12).phi_c_Pn    # kips; Chapter E
Mcx = flexure(section=column, Fy=50.0, Lb=14 * 12).phi_b_Mn      # kip-in.; Chapter F
print(check_axial_flexure_interaction(Pr=600.0, Pc=Pc, Mrx=1200.0, Mcx=Mcx).utilisation)  # Chapter H

# Chapter C / Appendix 8 (AISC Design Examples C.1A and C.1C)
print(notional_load(288.0))                                      # Ni = 0.002*alpha*Yi = 0.576 kips
RM = calculate_RM(Pmf=144.0, Pstory=288.0)
print(calculate_B2(288.0, calculate_Pe_story(H=1.21, L=240.0, delta_H=0.304, RM=RM)))  # 1.48

BS 5950 Example

from steelsnakes.BS import UB, classify_section

beam = UB("457x191x67")
print(classify_section(beam, steel_grade="S275", stress_pattern="bending-major-axis").class_name)  # plastic
print(classify_section(beam, steel_grade="S275", stress_pattern="compression").class_name)         # slender (d/t > 40ε)

# Section 4 member checks, in kN, kNm and mm
from steelsnakes.BS import UC, check_compression_and_bending, check_lateral_torsional_buckling

print(check_lateral_torsional_buckling(beam, LE_mm=4000.0, Mx_kNm=200.0, mLT=0.925).Mb)  # 246.1 kNm, pb = 167.4 N/mm²
result = check_compression_and_bending(
    UC("254x254x73"), Fc_kN=800.0, Mx_kNm=50.0, My_kNm=8.0, LEx_mm=5000.0, LEy_mm=5000.0, LE_LT_mm=5000.0, mx=0.9, my=0.9, mLT=0.925,
)
print(result.governing, result.utilisation.utilisation)  # lateral-torsional (4.8.3.3.2c), 0.851

Section Analysis Engine Example

steelsnakes.engine works out A, I, W, torsion and warping properties from a section's drawn geometry, using sectionproperties for the finite-element analysis. It reads tabulated sections directly, and also builds up sections the regional tables don't cover, such as a welded plate girder or a beam with a cover plate.

from steelsnakes.EU import IPE
from steelsnakes.engine import analyse_section

analysis = analyse_section(IPE("IPE-300"))
print(analysis.A, analysis.I_y, analysis.I_t, analysis.I_w)  # 5382 mm², 8.358e7 mm⁴, 1.98e5 mm⁴, 1.24e11 mm⁶
print(analysis.to_properties("EU"))  # {"A": 53.82, "I_yy": 8358.4, ...} back in the EU table's cm², cm⁴, dm⁶

A welded I-section from plain dimensions, in the UK table's keys:

from steelsnakes.base.sections import SectionType
from steelsnakes.engine import analyse_section

girder = analyse_section(
    section_type=SectionType.UB,
    properties={"h": 1040.0, "b": 300.0, "tw": 10.0, "tf": 20.0, "r": 0.0},
    region="UK",
)
print(girder.W_pl_y)  # 8.62e6 mm³

Contributing

All contributions are welcome! See the Contributing Guidelines for details.

License

This project is licensed under the GNU General Public License v2.0. See the LICENSE file for details.

Acknowledgments

  • SCI (Steel Construction Institute)
  • ArcelorMittal
  • AISC (American Institute of Steel Construction)
  • SAISC (South African Institute of Steel Construction)

Python 3.13 migration

  • Validate Python 3.13 support.
  • Update CI and documentation.
  • Verify dependencies and test suite.

Metadata

Release files for steelsnakes 0.0.1a11

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

Source distribution (sdist)

Source distribution for steelsnakes 0.0.1a11
File Size Uploaded Provenance Actions
steelsnakes-0.0.1a11.tar.gz 1.2 MB Without provenance Details for steelsnakes-0.0.1a11.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for steelsnakes 0.0.1a11
File Interpreter ABI Platform Actions
steelsnakes-0.0.1a11-py3-none-any.whl Python 3 none any Details for steelsnakes-0.0.1a11-py3-none-any.whl

Total release size: 2.4 MB

Release files / steelsnakes-0.0.1a11.tar.gz

Download URL steelsnakes-0.0.1a11.tar.gz
Size 1.2 MB
Tags Source
SHA-256 checksum
How to use checksums
c705950b265fef6cbbcbbebec77634bc76cd63f3d2a9ae607592b0f645018921
BLAKE2b-256 checksum
How to use checksums
c22f36ee3ed4f61450a100368a4240d190fad80d20d70b73a78886f56b5230f9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / steelsnakes-0.0.1a11-py3-none-any.whl

Download URL steelsnakes-0.0.1a11-py3-none-any.whl
Size 1.2 MB
Tags Python 3
SHA-256 checksum
How to use checksums
707e0d7d91de7fccd1a6e0a1aeff365896cc49f634e7afae161c7fa55c58467e
BLAKE2b-256 checksum
How to use checksums
3862fb3227e685e82b3aa3b88ff509d76ab659fd570f3402d5d113aceb3777a3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Security for steelsnakes 0.0.1a11

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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