Skip to main content

lifelib

Life actuarial models in Python

https://img.shields.io/pypi/pyversions/lifelib https://img.shields.io/pypi/v/lifelib https://img.shields.io/pypi/l/lifelib

What is lifelib?

lifelib is a collection of open-source life actuarial models written in Python. lifelib includes a variety of models, with sample scripts and Jupyter notebooks that demonstrate how to use the models.

Visit https://lifelib.io for more information!

What for?

lifelib models are highly versatile and transparent. You can customize lifelib models and utilize them in various practical areas, such as:

  • Model validation / testing

  • Pricing / profit testing

  • Research / educational projects

  • Valuation / cashflow projections

  • Asset-liability modeling

  • Risk and capital modeling

  • Actuarial modernization to replace spreadsheet models

Why lifelib?

By effectively utilizing the models in lifelib, you can expect the following benefits from both model development and governance perspectives:

  • A more efficient, transparent, and faster model development experience

  • Model integration with the Python ecosystem (Pandas, Numpy, SciPy, etc.)

  • Elimination of spreadsheet errors

  • Improved version control and model governance

  • Automated model testing

Some of the models in lifelib are built using modelx, an open-source Python package for building object-oriented models in Python. By using lifelib, you can enjoy the following advantages:

  • Models run fast!

  • Formulas are easy to read

  • Easy to trace formula dependency and errors

  • Formulas are instantly evaluated

  • Pandas and Numpy can be utilized

  • Object-oriented

  • Input from Excel and CSV files

  • Documents can be integrated

  • Formulas are saved in text files

License

Copyright (c) 2018-2026 lifelib Developers

lifelib is free software; you can redistribute it and/or modify it under the terms of MIT License.

Contributions, productive comments, requests and feedback from the community are always welcome. Information on lifelib development is found at Github https://github.com/lifelib-dev/lifelib

Requirements

The lifelib package requires Python 3.10 or newer, and the following third-party packages.

  • modelx

  • networkx 2.0+

  • Numpy

  • Pandas

  • OpenPyXL

  • SciPy

lifelib consists of multiple libraries. Each library may have additional requirements in addition to the above.

Development

For developers contributing to lifelib, a Makefile is provided to simplify environment setup and common development tasks.

Quick start:

make init                      # Set up development environment (use Git Bash or WSL if you use a Windows machine)
source venv_lifelib/bin/activate  # Activate virtual environment
make test                      # Run tests

Common commands:

make help              # Show all available commands
make install-dev       # Install with dev dependencies
make test              # Run tests
make test-cov          # Run tests with coverage report
make format            # Auto-format code (black, isort)
make lint              # Check code quality (flake8)
make clean             # Clean generated files

For detailed information, see devnotes/MAKEFILE.md and devnotes/TESTING.md.

Contributors

  • 2023

    • @alexeybaran

    • @fumitoh

    • @MatthewCaseres

  • 2018-2022

    • @alexeybaran

    • @fumitoh

    • @GregorFabjan

    • @lewisfogden

    • @qnity

History

lifelib was first released on January 2nd, 2018.

Metadata

Release files for lifelib 0.17.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lifelib 0.17.6
File Size Uploaded Provenance Actions
lifelib-0.17.6.tar.gz 32.3 MB Without provenance Details for lifelib-0.17.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for lifelib 0.17.6
File Interpreter ABI Platform Actions
lifelib-0.17.6-py3-none-any.whl Python 3 none any Details for lifelib-0.17.6-py3-none-any.whl

Total release size: 65.7 MB

Release files / lifelib-0.17.6.tar.gz

Download URL lifelib-0.17.6.tar.gz
Size 32.3 MB
Tags Source
SHA-256 checksum
How to use checksums
bd5c4f289ddd6a802570e601fa221393236a2f92734f7bf23351e5e58435fa22
BLAKE2b-256 checksum
How to use checksums
546c7fee93822c5ce70e9171776391d76a3c98e7dcf0c02dc6e6cc50aca395af
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Release files / lifelib-0.17.6-py3-none-any.whl

Download URL lifelib-0.17.6-py3-none-any.whl
Size 33.4 MB
Tags Python 3
SHA-256 checksum
How to use checksums
9f00f2c0e8222817f2c6197ffe872a7cf4698c180f42cc78d0ba50b6facb3193
BLAKE2b-256 checksum
How to use checksums
838cdbea6daa9e5191ae88cb4ae45208c9880d10ea5d09011f29fc9fc95cba70
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Security for lifelib 0.17.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.17.6 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page