skillfed

trianglesolver

Find all the sides and angles of a triangle, if you know some of the sides and/or angles. (Uses the Law of Sines and Law of Cosines.)

trianglesolver v1.2 414.5K downloads/30d#6,831 on PyPI
Permissive license MIT Abandoned released

What it is and what it does

Trianglesolver is a lightweight utility that applies trigonometric laws to compute missing sides and angles in a triangle when you provide at least three known values. It exports a single main function, solve(), that takes any combination of side lengths (a, b, c) and angles (A, B, C) as keyword arguments and returns all six values. The package follows standard geometric convention: lowercase letters denote sides, uppercase denote angles, and corresponding letters are opposite each other.

The package has no runtime dependencies and installs as a pure Python wheel, making it trivial to add to any project. All angles are in radians by default, but a degree constant is provided for easy conversion. It is intended for educational use and scientific applications where quick triangle calculations are needed.

Use it for:

  • Educational geometry or trigonometry exercises where students need to verify triangle solutions.
  • Scientific simulations or engineering calculations requiring rapid triangle geometry resolution.
  • Navigation or surveying applications where partial triangle measurements must be completed.
  • Physics or mechanics problems involving triangular force diagrams or structural analysis.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Solves for unknown sides and angles of a triangle given partial information, using the law of sines and law of cosines.

Yes, if you need a simple, dependency-free triangle solver for educational or one-off scientific use. The low install friction and permissive license make it easy to add. However, the package is abandoned and receives no maintenance; do not rely on it for production systems or expect updates.

Install

trianglesolver on PyPI

pip

pip install trianglesolver

uv

uv add trianglesolver

poetry

poetry add trianglesolver

Installing trianglesolver

Before you install

Low install friction with no runtime dependencies. However, the package is abandoned—last release was 2020-04-10, with no active maintenance or updates since then.

License in practice

MIT license is permissive; you can use, modify, and distribute this package freely with minimal restrictions, though you must retain the license notice.

Quickstart

from math import pi
from trianglesolver import solve, degree

# Solve with radians
a, b, c, A, B, C = solve(b=7.6, c=8.3, A=pi/3)

# Or convert using degree constant
result = solve(b=7, A=5*degree, B=70*degree)
print(result[2] / degree)  # angle C in degrees

Verify before relying

  • Whether the package handles all valid triangle configurations or has edge cases with degenerate inputs.
  • Current compatibility with modern Python versions (classifiers list Python 2 and 3 but no specific version pins).

Package facts

License MIT (permissive)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance abandoned — 2,317 days since the last release
First released
Downloads 414,548/month — #6,831 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: trianglesolver-1.2-py3-none-any.whl

Keywords: trigonometry, triangle, law of sines, law of cosines

Development Status :: 4 - BetaIntended Audience :: EducationIntended Audience :: Science/ResearchLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 2Programming Language :: Python :: 3Topic :: Scientific/Engineering :: Mathematics

Tags

triangle solverlaw of sines cosinestrigonometry triangle calculationfind triangle sides anglessolve triangle geometrytrigonometric triangle solver
trigonometrygeometryeducation

More Mathematics packages