A real-world Python calculation utility library — finance, geometry, unit conversion
Project description
Calcly
A real-world Python calculation utility library — zero dependencies, pure Python, Bangladesh-friendly.
ইনস্টলেশন
pip install Calcly
কী কী আছে?
| Module | বিবরণ |
|---|---|
basic |
যোগ, বিয়োগ, গুণ, ভাগ, গড়, clamp |
advanced |
EMI, tax, discount, সুদ, লাভ-ক্ষতি, bill split |
converter |
তাপমাত্রা, দূরত্ব, ওজন, BDT/USD, storage |
geometry |
ক্ষেত্রফল, পরিমিতি, আয়তন |
Quick Start
from Calcly import tax, emi, discount, area_circle
# ভ্যাট হিসাব
print(tax(1000, 15))
# {'base': 1000, 'tax_rate': 15, 'tax_amount': 150.0, 'total': 1150.0}
# EMI হিসাব (৫ লক্ষ টাকা, ১২% সুদ, ২৪ মাস)
result = emi(500000, 12, 24)
print(f"মাসিক EMI: ৳{result['monthly_emi']:,.2f}")
# ছাড় হিসাব
print(discount(2000, 20))
# {'original': 2000, 'discount_percent': 20, 'discount_amount': 400.0,
# 'final_price': 1600.0, 'savings': 400.0}
# বৃত্তের ক্ষেত্রফল
print(area_circle(7)) # 153.938
Financial Examples
from Calcly import compound_interest, profit_loss, split_bill, simple_interest
# চক্রবৃদ্ধি সুদ (১ লক্ষ টাকা, ১০%, ৫ বছর, মাসিক)
ci = compound_interest(100000, 10, 5)
print(f"মোট: ৳{ci['total_amount']:,}") # ৳164,530.88
print(f"সুদ: ৳{ci['interest_earned']:,}") # ৳64,530.88
# লাভ-ক্ষতি
pl = profit_loss(cost_price=45000, selling_price=54000)
print(f"{pl['type']}: {pl['percent']}%") # profit: 20.0%
# রেস্টুরেন্ট বিল ৪ জনে ভাগ (১০% tip সহ)
bill = split_bill(1200, 4, tip_pct=10)
print(f"জনপ্রতি: ৳{bill['per_person']}") # ৳330.0
Unit Converter Examples
from Calcly import (
celsius_to_fahrenheit, km_to_miles,
bdt_to_usd, usd_to_bdt, kg_to_lbs, mb_to_gb
)
print(celsius_to_fahrenheit(37)) # 98.6 (জ্বর)
print(km_to_miles(100)) # 62.1371
print(bdt_to_usd(11000, rate=110)) # 100.0
print(usd_to_bdt(100, rate=110)) # 11000.0
print(kg_to_lbs(70)) # 154.3234
print(mb_to_gb(2048)) # 2.0
Geometry Examples
from Calcly import (
area_rectangle, area_triangle, volume_sphere,
volume_cylinder, hypotenuse
)
room = area_rectangle(12, 8) # 96 বর্গমিটার
triangle = area_triangle(10, 6) # 30.0
ball = volume_sphere(5) # 523.5988
tank = volume_cylinder(1.5, 3) # 21.2058
c = hypotenuse(3, 4) # 5.0
সম্পূর্ণ Function List
basic
add, subtract, multiply, divide, power, modulo, average, clamp
advanced
percentage, percentage_of, add_percentage, tax, discount,
emi, simple_interest, compound_interest, profit_loss, split_bill
converter
celsius_to_fahrenheit, fahrenheit_to_celsius, km_to_miles, miles_to_km,
cm_to_inches, inches_to_cm, kg_to_lbs, lbs_to_kg, grams_to_oz, oz_to_grams,
bdt_to_usd, usd_to_bdt, currency_convert, liters_to_gallons, gallons_to_liters,
mb_to_gb, gb_to_tb, kb_to_mb, bytes_to_kb
geometry
area_circle, area_rectangle, area_square, area_triangle, area_trapezoid, area_ellipse,
perimeter_circle, perimeter_rectangle, perimeter_square, perimeter_triangle,
volume_cube, volume_box, volume_sphere, volume_cylinder, volume_cone, hypotenuse
Contributing
PR এবং Issues স্বাগত। দেখুন CONTRIBUTING.md।
License
MIT © Calcly Team
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 calcly-1.2.0.tar.gz.
File metadata
- Download URL: calcly-1.2.0.tar.gz
- Upload date:
- Size: 2.0 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e1919b4aec849b769697180c007194a7c4de4ff504f4d8f839099955ac5b0c62
|
|
| MD5 |
cc6c7d0d6f721ae304164e012d02eccc
|
|
| BLAKE2b-256 |
10ee4d144752fea8054bd577950458194cc18cb732f74e335ff533b08be2d849
|
File details
Details for the file calcly-1.2.0-py3-none-any.whl.
File metadata
- Download URL: calcly-1.2.0-py3-none-any.whl
- Upload date:
- Size: 3.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5c5ff5fb3214cb73c9df59da7c8cbd207a3fab001caa902f7bf4e0b922d156ca
|
|
| MD5 |
e4f7fb61bf0abac7f2d47de2153ed493
|
|
| BLAKE2b-256 |
dc93826762ce9ccd5a3f0b75a96dc1b9b8347d1789d5fec9eeed64908245f75a
|