SecureLend SDK for Python 
The official Python SDK for SecureLend - Financial services infrastructure for AI assistants.
Lender outcomes
Comparison stays on https://mcp.securelend.ai/mcp. Outcomes, credit box, feedback, and webhooks use https://securelend.ai.
client = SecureLend(api_key=os.environ.get("SECURELEND_API_KEY"))
await client.record_outcome(lead_id, {
"state": "declined",
"reasonCode": "dscr",
})
header = client.sign_outcome_payload(raw_body, secret)
A decline without reasonCode, and a funded outcome without an amount and date, raise ValidationError before the request. A flag that is off raises FeatureDisabledError.
Installation
pip install securelend
Quick Start
import asyncio
import os
from securelend import SecureLend
async def main():
# The API server is public and does not require an API key.
# A key can optionally be provided for usage tracking.
async with SecureLend(api_key=os.environ.get("SECURELEND_API_KEY")) as securelend:
response = await securelend.compare_business_loans({
"loanAmount": 200000,
"purpose": "equipment",
"annualRevenue": 1200000,
})
print(f"Found {response.summary.total_offers} loan offers.")
if response.offers:
top_offer = response.offers[0]
apr = top_offer.terms.interest_rate.apr * 100
print(f"Top offer from {top_offer.lender.name} with {apr:.2f}% APR.")
# Calculate payment details for the top offer
payment_details = await securelend.calculate_loan_payment({
"loanAmount": top_offer.terms.amount.amount,
"interestRate": apr,
"loanTermInMonths": top_offer.terms.term_months,
})
print(f" - Estimated Monthly Payment: ${payment_details.monthly_payment:,.2f}")
if __name__ == "__main__":
asyncio.run(main())
Documentation
Metadata
Release files for securelend 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| securelend-0.2.0.tar.gz | 14.7 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| securelend-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 30.3 kB
Release files / securelend-0.2.0.tar.gz
| Download URL | securelend-0.2.0.tar.gz |
|---|---|
| Size | 14.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2d5f2edafcb52a876e793e1c7db4e781b70d89973ccd7d1d64dfc8560f6d4cec
|
|
BLAKE2b-256 checksum How to use checksums |
12ce5e4d8d1806762d3acab3ba00f6dc1dda64743c9e865f74186f5e6169fe3a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Release files / securelend-0.2.0-py3-none-any.whl
| Download URL | securelend-0.2.0-py3-none-any.whl |
|---|---|
| Size | 15.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7aefa6b94f5b186200e7c42a5e2690b4eaae2a1a4a331a856e0a98794203049c
|
|
BLAKE2b-256 checksum How to use checksums |
cb7be0a777e4a510ec3d3ce99c4ff1682450a53388fb7aa73350f64b334a04e2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Security for securelend 0.2.0
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.