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.11+.
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sentinelpricing-0.1.3.tar.gz.
File metadata
- Download URL: sentinelpricing-0.1.3.tar.gz
- Upload date:
- Size: 27.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bd63990ef14056f1b578c77b97eb3505c74785873905f30c012eec5d5bf18b0b
|
|
| MD5 |
5afbdec0017becdf31ef25d1f6fbf34d
|
|
| BLAKE2b-256 |
990292a1e0123e248a6fa017e63fc514d8563899b8cf59f6eb0f5c2b93e1a38a
|
File details
Details for the file sentinelpricing-0.1.3-py3-none-any.whl.
File metadata
- Download URL: sentinelpricing-0.1.3-py3-none-any.whl
- Upload date:
- Size: 33.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
220c1a393be66c3ae83593df679afee16688f8075c2bc247955779d446cd6eaf
|
|
| MD5 |
b1bde63952ebce0353e5296db4dbab5f
|
|
| BLAKE2b-256 |
94abfbb4d6d551339e10d2ce7da40576b4e9a03f1a7398dc11405078ad0a3b32
|