Skip to main content

Sentinel Pricing Framework

Project description

Sentinel Rating Framework

Sentinel is a simple framework for insurance related pricing. Sentinel allows you to write your insurance product frameworks in pure Python. No additional packages or modules required.

# Standard Library Imports
import csv

# Sentinel Imports
from sentinelpricing import Framework

class Motor(Framework):
    """A Fake Motor Insurance Product...
	
        ...with very simple pricing.
    """

    def load_rating_file(self, path):
        with open(path) as f:
	    reader = csv.DictReader(f)
	    table = LookupTable(reader, name=path)
        return table

    def set_up(self):
    	"""Load rating tables into the framework"""
        self.age = load_rating_file("age_rates.csv")        
	self.lic = load_rating_file("lic_rates.csv")

    def calculation(self, quote):
        """Quote Calculation"""
        # Imagine a base rate of £/$150
        quote += 150
        
        # Multiply that by the age rating factor
        quote *= self.age[quote['age']]
        
        # Multiply that by the license years rating factor
        quote *= self.lic[quote['lic']]
        
        # Return the finished quote
        return quote

Motor.quote(
	{"age": 34, "lic": 7}
)

With a few lines of code, you are ready to use Sentinel to start building pricing engines for analysis, or rating engines ready for deployment. Python is the most popular language in the world (as of 2024), now you can use it and all its features to bring your work to the next level.

Installing Sentinel

Sentinel is available on PyPi, albeit with a slightly different name:

$ python -m pip install sentinelpricing

Sentinel officially supports Python 3.8+.

Features

Whilst in alpha development, features are expected to be added as and when - so keep checking!

  • Framework Inheritance
  • Audit Trails for Quote Calculations
  • Lookup Tables for Rates
  • Helpful Data Handling

Developers and API Reference

Note, the Sentinel Package should never require third-party libraries. You'll have enough of an argument with your IT department to just get Python installed - If they get wind of having to download dependencies you'll never hear the end of it.

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

sentinelpricing-0.1.0.tar.gz (26.7 kB view details)

Uploaded Source

Built Distribution

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

sentinelpricing-0.1.0-py3-none-any.whl (32.0 kB view details)

Uploaded Python 3

File details

Details for the file sentinelpricing-0.1.0.tar.gz.

File metadata

  • Download URL: sentinelpricing-0.1.0.tar.gz
  • Upload date:
  • Size: 26.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for sentinelpricing-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2c992884ed35ef5033c30a8f6b603c61b937a4e8541313c1bbc4c4a4ab129cb8
MD5 122336848c2b6534b266a96d7232516e
BLAKE2b-256 86da63c0f291d299fe196562c97d67f1b91653f7a3ce2c30b03521ed13489ade

See more details on using hashes here.

File details

Details for the file sentinelpricing-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for sentinelpricing-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 08c9a024559db0c1f8fba0920c2a1e421ccdd9af3e397f7f8bcc8226487be7ae
MD5 18a2c36744189a8627204e4971354c4f
BLAKE2b-256 117506ec9350fd6fed67ee7bca82de28a053dc547d7dc5dfbbb737d4a47804d1

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