Skip to main content

pythagore

A simple Python utility to work with the Pythagorean theorem.


✨ Features

  • Calculate the hypotenuse from two sides
  • Calculate a missing side using the hypotenuse
  • Verify if a triangle is right-angled
  • Retrieve library metadata (version, creator)

🔧 Installation

Install via pip:

pip install pythagore

🚀 Utilisation

This library is now a simple module (no class required).

Here is an example of using the module :

from pythagore import hypotenuse, adjacent_side, is_rectangle

a = 3
b = 4

h = hypotenuse(a, b)

print("Hypotenuse : ", h)

print("Is right triangle : ", is_rectangle(h, a, b))

missing = adjacent_side(h, a)
print("Missing side : ", missing)

example output

Hypotenuse: 5.0
Is right triangle: True
Missing side: 4.0

📦 Metadata

You can also access library information:

from pythagore import current_version, creator

print(current_version())
print(creator())

example output

1.5.0
Creator : Tina
GitHub : https://github.com/Tina-1300

❗ Prerequisites

  • Python >= 3.13.0
  • This library uses only the standard library (math)
  • No external dependencies required

📄 Licence

This project is distributed under the MIT License. See the LICENSE file for more information. LICENSE

Metadata

Release files for pythagore 1.6.1

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

Source distribution (sdist)

Source distribution for pythagore 1.6.1
File Size Uploaded
pythagore-1.6.1.tar.gz 3.7 kB Details

Built distribution (wheel)

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

Total release size: 7.2 kB

Release files / pythagore-1.6.1.tar.gz

Download URL pythagore-1.6.1.tar.gz
Size 3.7 kB
Tags Source
SHA-256 checksum
How to use checksums
88d2f047fcf09465570a51235f023568a2633f6faf5b8bd527561f7ca057c24f
BLAKE2b-256 checksum
How to use checksums
1f8a93e363d7d391c8c7837453fcdfeafae7f49f40a5abc22c9652203e8275e5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / pythagore-1.6.1-py3-none-any.whl

Download URL pythagore-1.6.1-py3-none-any.whl
Size 3.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b0648e7fa2eb1d24f41735f6fa5d78af9e051b08bc9b6aba43242e406dde66a7
BLAKE2b-256 checksum
How to use checksums
bf6cbb6ac7d92b90f8faa784cdddeecdcfc8a54fe7ddefac73ebdb9b3880451c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release history Release notifications | RSS feed

This release

1.6.1 This release

2 release files

1.5.0

2 release files

1.4.1

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.0

2 release files

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