Skip to content

Home

This site contains the project documentation for the eurocodepy project that is a python package for using Eurocodes. Its aim is to give you a framework to build your project documentation using Python, MkDocs, mkdocstrings, and the Material for MkDocs theme.

Eurocodepy are Python functions to work with structural eurocodes. Material data is stored in a JSON file. Current materials in the database are:

urrent materials in the database are:

  • concrete (C20 to C90)
  • timber (C, D, GL)
  • reinforcement (B400, B500, A400, A500)
  • structural steel (S235, S275, S355, S450)

Available european steel profiles are:

  • IPE
  • HEA
  • HEB
  • HEM
  • L
  • C
  • T
  • Pipe
  • Box
  • Double L
  • Double C

There are also some functions to work with material properties:

  • creep_coef
  • shrink_strain

The existing functions are listed in the page 'Reference'. They are divided by eurocode.

Table Of Contents

The documentation follows the best practice for project documentation as described by Daniele Procida in the Diátaxis documentation framework and consists of four separate parts:

  1. Tutorials
  2. How-To Guides
  3. Reference
  4. Explanation
  5. License

Quickly find what you're looking for depending on your use case by looking at the different pages.

Projet overview

Provide several functions to help designers working with Eurocodes.

This module allows the user to make mathematical calculations.

The module contains the following functions:

db: Returns the database of the Eurocodes. ec1: Returns functions for ec1 calculations. ec2: Returns functions for ec2 calculations. ec3: Returns functions for ec3 calculations. ec5: Returns functions for ec5 calculations. ec7: Returns functions for ec7 calculations. ec8: Returns functions for ec8 calculations.

get_national_params(local=locale.PT, concelho='Lisboa')

Parameters:

Name Type Description Default
locale str

description. Defaults to "PT".

required
concelho str

description. Defaults to "Lisboa".

'Lisboa'

Returns:

Name Type Description
dict dict

description

Source code in eurocodepy/__init__.py
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
def get_national_params(local: locale = locale.PT, concelho: str = "Lisboa") -> dict:
    """

    Args:
        locale (str, optional): _description_. Defaults to "PT".
        concelho (str, optional): _description_. Defaults to "Lisboa".

    Returns:
        dict: _description_
    """
    pt_data = locale[local.name]
    row = pt_data[pt_data['Concelho'] == concelho]
    # Convert to dict if found
    if not row.empty:
        result = row.iloc[0].to_dict()
        print(result)
    else:
        result = None
        print("Concelho not found.")
    return result

Support

If you need any help you can contact the developer via email.

Github: [http://github.com/pcachim/eurocodepy]

Acknowledgements

I want to thank my house plants for providing me with a negligible amount of oxygen each day. Also, I want to thank the sun for providing more than half of their nourishment free of charge.