Skip to main content

CreditSetu

General-purpose, explainable credit intelligence engine for thin-file and alternative-data lending. Score customers on behavioral transaction data — including customers with no bureau score at all — using three composable engines (Intent, Capacity, Guardrail), SHAP-backed explanations, and regulator-style adverse action reason codes.

This is the library package. For the full project — a reference FastAPI service, a React dashboard, synthetic demo data, and deployment docs — see the GitHub repository.

Install

pip install creditsetu

That pulls in only pandas, numpy, scikit-learn, lightgbm, pydantic, and pyyaml — enough to fit models and score customers. SHAP explainability and ruptures-based life-event detection are opt-in and degrade gracefully if skipped:

pip install "creditsetu[explain]"   # + SHAP feature attributions / adverse action reasons
pip install "creditsetu[intent]"    # + ruptures change-point life-event detection
pip install "creditsetu[full]"      # both

Usage

from app.pipeline import CreditIntelligencePipeline
from app.scoring_profile import ScoringProfile

# Currency, guardrail thresholds, product catalog, weights — all policy,
# no code changes needed to adapt this to a different institution/market.
profile = ScoringProfile(name="acme", org_name="Acme Lending", currency_symbol="$")
pipeline = CreditIntelligencePipeline(profile=profile)

# Fit on your own historical data — customers_df needs a
# `true_repayment_capacity` column, ideally a real `is_stressed` column too.
pipeline.fit(customers_df, transactions_df)

# Score one customer...
result = pipeline.score_customer(customer, customer_transactions_df)

# ...or a whole batch, vectorized end-to-end.
scores_df = pipeline.score_batch(customers_df, transactions_df)

Data contract — customer is a dict needing at least customer_id and bureau_score (None is a first-class value, not an edge case — that's the point). transactions is a DataFrame with date, amount, type (credit/debit), category, counterparty, is_bounce.

Full details live in the package's pipeline.py module docstring, and the complete architecture/evaluation writeup is in the GitHub README.

License

MIT

Metadata

Release files for creditsetu 1.0.0

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

Source distribution (sdist)

Source distribution for creditsetu 1.0.0
File Size Uploaded
creditsetu-1.0.0.tar.gz 63.2 kB Details

Built distribution (wheel)

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

Total release size: 131.8 kB

Release files / creditsetu-1.0.0.tar.gz

Download URL creditsetu-1.0.0.tar.gz
Size 63.2 kB
Tags Source
SHA-256 checksum
How to use checksums
83f21b8d176b796345cd32b05b3730e3f6db085431e6b6c108184c708a43e334
BLAKE2b-256 checksum
How to use checksums
66920ce708673143384de750ec1502df00dd2ea1d6d0fa24dea770f06f0603c1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 31, 2026.

Transparency log

Release files / creditsetu-1.0.0-py3-none-any.whl

Download URL creditsetu-1.0.0-py3-none-any.whl
Size 68.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8ea5cf32dd9d878a22c215fda0d03d68580c28caa4065fc950b301ed474919f9
BLAKE2b-256 checksum
How to use checksums
a3cf63b827ecfcdcadfd323562fa142dac8c45385a30fad2deb816108826605c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 31, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

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