shapes_geometry
shapes_geometry is a lightweight Python package for performing geometry calculations for common 2D and 3D shapes. It provides simple functions to compute area, perimeter, volume, surface area, and other geometric properties — perfect for students, educators, and developers building math-related tools.
Features
- 2D Shapes: Circle, Triangle, Square, Rectangle, Parallelogram, Rhombus, Trapezium, Kite, Semicircle, Regular Polygons (Pentagon, Hexagon, Octagon, Decagon)
- 3D Shapes: Sphere, Cube, Cuboid, Cone, Cylinder
- Simple API with functional structure (no classes)
- Easy to extend and integrate into other Python projects
📌 Version History
v0.2 - Current Version
- Added Torus and Ellipsoid Geometric Calculations.
- Added Regular Polygon Calculations.
- Added
CalculationErrorwhich is raised when calculations cannot be performed.
v0.1.5
- Added
utils.validate_positive_numbers()for reusable validation. - Added Geometric Calculations for Capsule.
v0.1.4
- Added
utils.validate_positive_numbers()for reusable validation. - Applied consistent dimension checks across shapes (circle, cylinder, etc.).
- Improved exception handling with:
ShapesGeometryErrorInvalidDimensionErrorInvalidCoordinateError
v0.1.3
- Added support for more 2D and 3D shapes (parallelogram, trapezium, cone, etc.).
- Introduced initial exception handling for invalid dimensions.
v0.1.2
- Implemented core shapes: Circle, Square, Rectangle, Triangle, Cube, Sphere, Cylinder.
- Added area, perimeter, surface area, and volume functions.
v0.1.1
- Basic setup with
__init__.py. - Organized shapes into modules.
- First working release with Circle and Square.
Installation
pip install shapes-geometry
Example Usage
from shapes_geometry.shapes import circle, square, rectangle
print(circle.area(5)) # Output: 78.53981633974483
print(square.perimeter(4)) # Output: 16
print(rectangle.area(10, 5)) # Output: 50
Metadata
Release files for shapes-geometry 0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| shapes_geometry-0.2.tar.gz | 7.9 kB | Without provenance | Details for shapes_geometry-0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| shapes_geometry-0.2-py3-none-any.whl | Python 3 | none | any | Details for shapes_geometry-0.2-py3-none-any.whl |
Total release size: 21.2 kB
Release files / shapes_geometry-0.2.tar.gz
| Download URL | shapes_geometry-0.2.tar.gz |
|---|---|
| Size | 7.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ffc5b9b2f4279b21d189ded40d8adbef97729817c1b995120d77773c97aa6e70
|
|
BLAKE2b-256 checksum How to use checksums |
002bef6b567b7f254741bdeebecb68be80548a562fd13180c97e6daf9de92cf0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.8.10
|
Release files / shapes_geometry-0.2-py3-none-any.whl
| Download URL | shapes_geometry-0.2-py3-none-any.whl |
|---|---|
| Size | 13.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a22b8e008dc866af8547c6a279355c8da9a2ce6c6945561f5994ddeffcc2f6c1
|
|
BLAKE2b-256 checksum How to use checksums |
a5b185ea7ee37c9d4ede6cc44bc4d47669b87e7461ae57c31c165b6350c37f15
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.8.10
|
Security for shapes-geometry 0.2
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.