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.5.tar.gz (3.1 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.5-py3-none-any.whl (3.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: premium_calculator_bv-0.0.5.tar.gz
  • Upload date:
  • Size: 3.1 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.5.tar.gz
Algorithm Hash digest
SHA256 54eafd4bec7a9e4fa75654e571b99c03f39a6cfb9f936da878ec46d6ceb93ed9
MD5 b37ae1fdfe7ea1549ce91e785f319953
BLAKE2b-256 549a22e1be152c2895753661adf6cc793661e2b4c1ff677d6ec36539bc60dc0a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for premium_calculator_bv-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 b3b1a8d912da310c591ea122d3548fccf764ff69bed6fa327ce3bc9b9725b48c
MD5 4999eb6a3024837c4b4eddecbdaf64fb
BLAKE2b-256 6e044122b4222de289c5c7660f4828a1184619eae63d73fc3cb45f788f2ca747

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