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

# Returns a Quote object from the Motor Framework.
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.2.tar.gz (27.3 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.2-py3-none-any.whl (33.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sentinelpricing-0.1.2.tar.gz
  • Upload date:
  • Size: 27.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for sentinelpricing-0.1.2.tar.gz
Algorithm Hash digest
SHA256 76a6be194f5f3ecd066e76f5239e7196b19e59b8afde754ec877ff26e3662694
MD5 1a9ef899be9fa020f733dcef34a568a1
BLAKE2b-256 0f260598cc3714dfcfc5f45aa3660731e1c25f8bbbf31ccf706cacf98727425b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sentinelpricing-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 32ab447c18bb2f4b99cdca28c41668bfe47f29abd4ce43fb0217c806969188ca
MD5 93ca9c5ef75b193213c34d092c3df7c6
BLAKE2b-256 e351a32b177458d91c1dd3ae3889b30b143b0396f7c35a95dbfc5eaebd8e0927

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