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

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.4
File Size Uploaded Provenance Actions
lifelib-0.17.4.tar.gz 30.4 MB Without provenance Details for lifelib-0.17.4.tar.gz

Built distribution (wheel)

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

Total release size: 61.7 MB

Release files / lifelib-0.17.4.tar.gz

Download URL lifelib-0.17.4.tar.gz
Size 30.4 MB
Tags Source
SHA-256 checksum
How to use checksums
f20eb204643aa0cab9f07aaa016d9bc349d9d36074b44a9ca98bd62d78ebcb9e
BLAKE2b-256 checksum
How to use checksums
0ffceae31468ce5d1c591dc0218f1ff6af3f92d133ec3113500c058a81b3d252
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.4-py3-none-any.whl

Download URL lifelib-0.17.4-py3-none-any.whl
Size 31.3 MB
Tags Python 3
SHA-256 checksum
How to use checksums
3ce2afb23551a2857a00e671c15e08996a3a57b19e4b593d3b73bc9964f1ae20
BLAKE2b-256 checksum
How to use checksums
d112e0afdc637ae10ffcb9eeb8dcbbe80e0f8f31467715ef7bc747d334c0a5ee
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.4

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