Skip to main content

Logo

Tests    Coverage Status    License: MIT    PyPI version

efficalc

A feature-rich Python library for reimagined engineering calculations.

Contents

Introduction

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.

Simple syntax for Python calculations:

Efficalc Demo Typing

Turns into submittal-ready reports:

Efficalc Demo Report

Examples

Some simple examples

Some more complex examples

Documentation and Distribution

Quickstart

Installation

Install efficalc with pip:

pip install efficalc

First Calculation Function

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")

View the Report

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 resulting calculation report

Updating Input Values

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()

Features

Automated report generation

Generate detailed, professional reports automatically, ensuring clarity and precision in communication.

Open source

efficalc welcomes community contributions. Request features or contribute directly to enhance its capabilities.

Engineering-specific features

Benefit from built-in tools tailored to solving common engineering challenges. See our section property library in action.

Reusable

Create calculation templates once and reuse them across multiple designs and projects, saving time and ensuring consistency.

Testable

Easily test your calculations to reduce errors and improve confidence every design. Read the testing guide.

Integrate with other workflows

Seamlessly integrate with your existing Python-enabled workflows to boost efficiency and connectivity across tools and platforms. See some examples of this.

Figures now supported

Easily add figures to your calculation reports for even more clarity. Read the full documentation for figures.

Control your content

Tailor your calculation reports to include only the most relevant information, making them as concise or detailed as you prefer.

Contributing

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.

  • Report issues here.
  • Submit pull requests here.

Built With

Documentation

License

efficalc is released under the MIT License.

Metadata

Release files for efficalc 1.2.7

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

Source distribution (sdist)

Source distribution for efficalc 1.2.7
File Size Uploaded Provenance Actions
efficalc-1.2.7.tar.gz 269.8 kB Without provenance Details for efficalc-1.2.7.tar.gz

Built distribution (wheel)

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

Total release size: 546.4 kB

Release files / efficalc-1.2.7.tar.gz

Download URL efficalc-1.2.7.tar.gz
Size 269.8 kB
Tags Source
SHA-256 checksum
How to use checksums
b1ea5024e318255efb31b11feedd52ffda533887f31e8f2ecebb641313d72ada
BLAKE2b-256 checksum
How to use checksums
91035941c2bc81a8d8a01d701f1f431a00a3783f382dd53393b4cbad74f2b0ac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.0

Release files / efficalc-1.2.7-py3-none-any.whl

Download URL efficalc-1.2.7-py3-none-any.whl
Size 276.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6f33e449beb1adffb035c8b91e2d5e25fdc910cab91bf27d3d812767183b3193
BLAKE2b-256 checksum
How to use checksums
a0feaf08ee5c644d1f87da1602dffc859a1349f62a98ed234e599dcea3bff15b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.0

Security for efficalc 1.2.7

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