MensuraPy is a Python package that provides accurate and user-friendly functions to calculate the area, perimeter, surface area, and volume of 2D and 3D geometric shapes.
Project description
MensuraPy is a Python package that provides accurate and user-friendly functions to calculate the area, perimeter, surface area, and volume of 2D and 3D geometric shapes. Designed for learners, educators, developers, and engineers alike, it makes geometry calculations easy and consistent, supporting multiple units.
- Documentation: https://medium.com/@anuvadas666/mensurapy-documentation-a19159125aab
- Source code: https://github.com/Anuva13/MensuraPy/tree/main/MensuraPy
- Bug reports: https://github.com/Anuva13/MensuraPy/issues
- Report a security vulnerability: https://github.com/Anuva13/MensuraPy/security
🚀 Features
- Area calculation for 2D shapes like square, rectangle, circle, triangle, ellipse, and more
- Perimeter calculation for standard 2D and 3D shapes
- Surface area computation for cubes, cuboids, spheres, cones, cylinders, etc.
- Volume calculation for 3D shapes with unit consistency
- Support for multiple units (mm, cm, m, etc.)
- Built-in exception handling
- Modular and extensible structure
📦 Installation
pip install mensurapy
🛠 Usage
from mensurapy import area, perimeter, surface_area, volume
print(area("rectangle", "5m", "10m")) # 50.0 m²
print(perimeter("circle", "7cm")) # 43.96 cm
print(surface_area("cube", "4m")) # Total Surface Area: 96.0 m²
print(volume("cylinder", "3m", "10m")) # 282.74 m³
📚 Supported Shapes
2D Shapes Square, Rectangle, Circle, Triangle, Parallelogram, Trapezium, Ellipse, Rhombus
3D Shapes Cube, Cuboid, Sphere, Cone, Cylinder, Pyramid, Prism, Hemisphere, Ellipsoid
🧪 Testing
To run tests for MensuraPy:
- Clone the repository.
- Navigate to the project directory
- Run the tests using
python -m unittest discover tests
🧠 Why MensuraPy?
MensuraPy provides an easy-to-use solution for calculating measurements in geometry. It's designed with simplicity and efficiency in mind, offering a wide range of functionality to handle various geometric shapes in both 2D and 3D. With MensuraPy, you can easily integrate these calculations into your projects without having to manually handle complex formulas and conversions.
🤝 Contributing
Contributions are welcome! If you'd like to contribute to MensuraPy, please follow these steps:
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Commit your changes.
- Push your changes to your fork.
- Open a pull request to the main repository.
Please ensure your code follows the style guidelines and that tests are added for any new functionality.
📄 License
MensuraPy is released under the MIT License. See the LICENSE file for more information.
Links
GitHub: https://github.com/Anuva13/MensuraPy/blob/main/README.md PyPI:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mensurapy-0.1.0.tar.gz.
File metadata
- Download URL: mensurapy-0.1.0.tar.gz
- Upload date:
- Size: 15.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f5d305ddfc4ca50c222aa76f540a444b4872556b2946dac8307b55bc173bfd0e
|
|
| MD5 |
df61ce706de58877e9a81348c1dd21fa
|
|
| BLAKE2b-256 |
2ecb4830c3ea21ecea028471c408c038d4d2e66a86b7d45a6a3e2e9ae429d078
|
File details
Details for the file mensurapy-0.1.0-py3-none-any.whl.
File metadata
- Download URL: mensurapy-0.1.0-py3-none-any.whl
- Upload date:
- Size: 22.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d9ade45ba95acc04bcfd66e1c67d36406522f483d2f89b38de7022c035a99f7f
|
|
| MD5 |
e457642dce117b725956f4b685bc0e9f
|
|
| BLAKE2b-256 |
ab13452826a4ceda9c1f9792328bc9c59273825cce602c6011e5b666de671e38
|