Metadata-Version: 2.2
Name: sentinelpricing
Version: 0.1.0
Summary: Sentinel Pricing Framework
Home-page: https://github.com/JonathanForest/sentinelpricing
Author: Jonathan Pennell
Author-email: Jonathan Pennell <Jonathan@forestandrock.co.uk>
License: MIT License
        
        Copyright (c) 2025 Jonathan Pennell
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: dev
Requires-Dist: black; extra == "dev"
Requires-Dist: flake8; extra == "dev"
Requires-Dist: pytest; extra == "dev"
Requires-Dist: mypy; extra == "dev"
Dynamic: author
Dynamic: home-page
Dynamic: requires-python

# 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.

```python3
# 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.

