
Security News
Browserslist-rs Gets Major Refactor, Cutting Binary Size by Over 1MB
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
EurocodePy is a Python package for calculating structures according to Eurocodes. It provides a collection of functions that enable engineers to design and analyze structures based on the Eurocode standards. In addition, it includes a database of structural materials and steel profiles, making it easy to design and analyze structures according to Eurocode standards.
There are also some functions to work with material properties:
The utils package has some functions that can be useful:
You can install EurocodePy using pip or uv by running the following command:
pip install eurocodepy
or
uv add eurocodepy
Too upgrade to the latest version use:
pip install eurocodepy --upgrade
EurocodePy provides a range of functions for designing and analyzing structures according to Eurocodes. Here are some examples:
import eurocodepy as ec
from eurocodepy import ec2
EurocodePy includes a database of structural materials and steel profiles. The database is stored in a JSON file and can be easily updated or extended. The materials database includes properties such as the density, modulus of elasticity, and Poisson's ratio, while the steel profiles database includes properties such as the cross-sectional area, moment of inertia, and section modulus.
The database is stored in a JSON file 'eurocodes.json'. This file is loaded when the package is impoorted, soo you can modified it to include you own properties. If you have some suggestions or materials to add to the database and want them to be included for all the coommunity, please contribute as described below in the contributions section. Steel profiles arre stored in a separate file 'prof_euro.json'
The database can be accessed through a dictionary. There are also some aliases to easily access the database. The following code gives examples on how to use it.
import eurocodepy as ec
# To access the entire database
db = ec.db
# To access concrete class C30/37
conc = ec.db["Materials"]["Concrete"]["Classes"]["C30/37"] # Alternative 1
conc = ec.Materials["Concrete"]["Classes"]["C30/37"] # Alternative 2
conc = ec.Concrete["Classes"]["C30/37"] # Alternative 3
conc = ec.ConcreteClasses["C30/37"] # Alternative 4
# to access a steel profile
ipe200 = ec.SteelProfiles["I_SECTION"]["IPE200]
Current materials in the database are:
Available european steel profiles are:
A more or less complete description of existing packages and modules can be found on https://pcachim.github.io/eurocodepy
This project is licensed under the MIT License. See the LICENSE file for details.
We welcome contributions from everyone. Before getting started, please read our Code of Conduct and Contributing Guidelines.
FAQs
A package for eurocode calculations
We found that eurocodepy demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.
Security News
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.