Skip to main content

Simple library to calculate insurance premium

Project description

Premium Calculator Library

This is a simple package to calculate insurance premium. This library puporse is to use on master's project, its puporse is to demostrate that I learned how to deploy a library and use on my CA project.

Features

  • Calculate premiums
  • Calculate risk factors based on collection type

Instalation

pip install premium-calculator-bv

Usage

Here is an example of how to use the PremiumCalculator class:

from premium_calculator_pkg.premium_calculator import PremiumCalculator

# Initialize the calculator with a base rate (example, 0.01 for 1%)
calculator = PremiumCalculator(base_rate=0.01)

# Calculate risk factor from percentage (example, 8 for 8%)
risk_factor_percentage = 8
risk_factor = calculator.calculate_risk_factor(risk_factor_percentage)
if risk_factor is not None:
    collection_value = 1000
    premium = calculator.calculate_premium(collection_value, risk_factor)
    print(f"The calculated premium for a collection worth ${collection_value} with {risk_factor_percentage}% risk factor is: ${premium}")
else:
    print(f"Could not calculate premium due to invalid risk factor percentage.")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

premium_calculator_bv-0.0.4.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

premium_calculator_bv-0.0.4-py3-none-any.whl (3.3 kB view details)

Uploaded Python 3

File details

Details for the file premium_calculator_bv-0.0.4.tar.gz.

File metadata

  • Download URL: premium_calculator_bv-0.0.4.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for premium_calculator_bv-0.0.4.tar.gz
Algorithm Hash digest
SHA256 cc41495e3e1f0474f436e0ce6d001a376a363d4699fe75246a07fa9f3242b422
MD5 d58e6ef2f8bbbefc5082fa7d03f9f24a
BLAKE2b-256 04059bdb65bc16a45d3b96971b5e58b550f99e916c49f42039c5281df4ef0e80

See more details on using hashes here.

File details

Details for the file premium_calculator_bv-0.0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for premium_calculator_bv-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 b6132b4c36f7f01dad3f9ebe6288d20c44d21a0a38e28707d874ebeeb9252b01
MD5 bac502fa6b6aff8b5083415cfe44f6c6
BLAKE2b-256 095a0ff29afc26a2ef7b1dd20af6ef23853245ab71c2402b345bda68d4e67472

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page