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.)
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 trianglesolveruv
uv add trianglesolverpoetry
poetry add trianglesolverInstalling 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
Tags
More Mathematics packages
NetworkX provides data structures and…
permissive · top 1,000 on PyPI
kiwisolverkiwisolver is a Python binding to a fast C++…
permissive · top 1,000 on PyPI
sympySymPy is a Python library for symbolic…
permissive · top 1,000 on PyPI
contourpyContourPy calculates contours of 2D…
permissive · top 1,000 on PyPI
torchPyTorch provides GPU-accelerated tensor…
permissive · top 1,000 on PyPI
onnxruntimeonnxruntime loads and executes Open Neural…
permissive · top 1,000 on PyPI
cytriangleCyTriangle wraps Jonathan Shewchuk's Triangle…
copyleft · top 15,000 on PyPI
lineaxLineax solves linear systems and least-squares…
permissive · top 15,000 on PyPI
triangleTriangle wraps Jonathan Richard Shewchuk's C…
copyleft · top 15,000 on PyPI
pycosatProvides efficient Python bindings to PicoSAT,…
permissive · top 15,000 on PyPI
qpsolversProvides a unified Python interface to solve…
copyleft · top 5,000 on PyPI
transforms3dConverts between different 3D geometric…
permissive · top 15,000 on PyPI
quadprogSolves strictly convex quadratic programming…
copyleft · top 15,000 on PyPI
pystac-ext-viewExtends PySTAC with the View Geometry…
permissive · top 5,000 on PyPI
anticaptchaofficialSolves CAPTCHAs and related challenges (image…
permissive · top 15,000 on PyPI
klujaxSolves sparse linear systems in JAX using the…
copyleft · top 15,000 on PyPI