Contents
efficalc provides an extensible, testable, and powerful framework for building and managing complex calculations.
efficalc is designed to transform how engineers approach calculations, moving away from traditional methods like manual spreadsheets and toward a more efficient, accurate, and collaborative engineering calculation process.
Install efficalc with pip:
pip install efficalc
Calculations in efficalc are written as a function.
These calculation functions are primarily composed of Input
and Calculation
elements, but there are also many more options to make a clear and accurate calculation.
from efficalc import Calculation, Input, Title, sqrt
def calculation():
Title("Pythagorean's Theorem and Perimeter")
a = Input("a", 3, description="Length of side a")
b = Input("b", 4, description="Length of side b")
c = Calculation("c", sqrt(a**2 + b**2), description="Length of the hypotenuse")
Calculation("P", a + b + c, description="Perimeter of the triangle")
Instantly view or print a report for your calculation in your browser with the ReportBuilder
.
from efficalc.report_builder import ReportBuilder
from pythagorean_perimeter import calculation
builder = ReportBuilder(calculation)
builder.view_report()
The value provided to the Input
class in your calculation function is treated as a default value.
When you run your calculation with different input values, pass in a dictionary of the default overrides into the optional second parameter of the ReportBuilder
:
new_inputs = {"a": 9.2, "b": 0.87}
builder = ReportBuilder(calculation, new_inputs)
builder.view_report()
Generate detailed, professional reports automatically, ensuring clarity and precision in communication.
efficalc welcomes community contributions. Request features or contribute directly to enhance its capabilities.
Benefit from built-in tools tailored to solving common engineering challenges. See our section property library in action.
Create calculation templates once and reuse them across multiple designs and projects, saving time and ensuring consistency.
Easily test your calculations to reduce errors and improve confidence every design. Read the testing guide.
Seamlessly integrate with your existing Python-enabled workflows to boost efficiency and connectivity across tools and platforms. See some examples of this.
Easily add figures to your calculation reports for even more clarity. Read the full documentation for figures.
Tailor your calculation reports to include only the most relevant information, making them as concise or detailed as you prefer.
We welcome contributions of all kinds from the community! Whether it's reporting a bug, requesting a feature, or submitting a pull request, your input and engagement is invaluable to efficalc's development.
efficalc is released under the MIT License.